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
On https://cloud.domain.com/remote.php/dav/files/myusername/

  • 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
https://cloud.domain.com/ocs/v2.php/cloud/users/myusername
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/cloud.domain.com/public_html/apps/serverinfo/lib/OperatingSystems/DefaultOs.php#164

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 => 'cloud.domain.com', ), 'datadirectory' => '/home/cloud/domains/cloud.domain.com/public_html/data', 'dbtype' => 'mysql', 'version' => '19.0.0.12', 'overwrite.cli.url' => 'http://cloud.domain.com', '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
https://cloud.domain.com/remote.php/dav/
I get:
<d:error>
<s:exception>Sabre\DAV\Exception\NotImplemented</s:exception>
<s:message>
There was no plugin in the system that was willing to handle this POST method.
</s:message>
</d:error>

https://cloud.domain.com/remote.php/dav/

Perhaps

https://cloud.domain.com

https://cloud.domain.com/remote.php/dav/files/username/

Always the same error: net::ERR_EMPTY_RESPONSE

the cloud.domain.com 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/

./build set http_methods GET:HEAD:POST:PROPFIND:OPTIONS:PUT:DELETE:MKCOL:COPY:MOVE:REPORT

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