File not found after installation of Nextcloud 16.0.3

I’ve just installed NC16.0.3 on Ubuntu Server 18.04. I finished the initial login, setting up the admin user and database, but after clicking “Finish Setup” I got a 404 status instead of the Files screen. I’ve tried using my desktop client with the same result. The files are present, but for some reason they aren’t being found. The files are owned by www-data with 755 permissions, so I don’t think that’s the problem. Anybody have any ideas?