Clean install not working: (failed)net::ERR_EMPTY_RESPONSE

Support intro

After a clean install on a DirectAdmin hostingpanel webserver running on Nginx:
I’m able to install, able to login, but once logged in I always get the error message
“Connection to server lost” in a popup window, top right

Inside the net panel I see following error:
(failed) net::ERR_EMPTY_RESPONSE

  • Inside the apache error log, nor in the Nextcloud logs I see an error that could explain the issue.
  • I applied the nginx config as described in the installation manual

Even when I try to change my language to English, on the url
I get the same error net::ERR_EMPTY_RESPONSE
He doesn’t save the changes.

Nextcloud version (eg, 18.0.2): webinstall latest version
Operating system and version (eg, Ubuntu 20.04): Latest centos
Apache or nginx version : nginx 1.19.0
PHP version 7.3.18

The issue you are facing:
net::ERR_EMPTY_RESPONSE in net panel for almost any action, nothing seems to be working.

Is this the first time you’ve seen this error? : Y, clean install

Steps to replicate it:

  1. Modify nginx config
  2. Install webinstall
  3. Create user and login

The output of your Nextcloud log in Admin > Logging:
Only when going to server info:
Error PHP Invalid argument supplied for foreach() at /home/cloud/domains/

Some older logs:
jsresourceloader Could not find resource js/setup.js to load
Warning no app in context Could not detect any host in http:///data/htaccesstest.txt

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php $CONFIG = array ( 'instanceid' => '123', 'passwordsalt' => '123', 'secret' => '123', 'trusted_domains' => array ( 0 => '', ), 'datadirectory' => '/home/cloud/domains/', 'dbtype' => 'mysql', 'version' => '', 'overwrite.cli.url' => '', 'dbname' => 'cloud_nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'dbuser' => 'cloud_nextcloud', 'dbpassword' => '123!!', 'installed' => true, 'loglevel' => 2, ); The output of your Apache/nginx/system log in `/var/log/____`: Nothing related to nextcloud

Please test an alternative browser.

Not working in another browser neither.
When browsing to
I get:
There was no plugin in the system that was willing to handle this POST method.


Always the same error: net::ERR_EMPTY_RESPONSE

the is working, but as mentioned there I get the error that the server connection is broken after logging in.

I found the solution after installing it’s competitor owncloud, which gave more detailed errors:

if your hosting panel is directadmin, you need to modify your server config a bit:
cd /usr/local/directadmin/custombuild/


Then apply the changes:
cd /usr/local/directadmin/custombuild && ./build rewrite_confs