NextCloud install fails client denied by server configuration

SYSTEM INFORMATION
OS type and version: Debian 10
Webmin version: 1.981
Virtualmin version: 6.17-3
Related products version: RECOMMENDED

I have been trying without success to install Nextcloud on virtualmin
First Centos will not install mbstring without breaking the system… So I ditched that and went for Debian 10 = Much better, however upon setup of a completely clean system I get " Internal Server Error

The server was unable to complete your request.

If this happens again, please send the technical details below to the server administrator.

More details can be found in the server log.

Technical details

  • Remote Address: 49.195.190.40
  • Request ID: PpEcLFGcXsKgwS7uXPji"
    The Apache logs show the following
    “Sun Nov 21 05:51:43.443455 2021] [access_compat:error] [pid 28494:tid 140708530861824] [client 65.108.93.41:42742] AH01797: client denied by server configuration: /home/pancakefactory/domains/flip.pancakefactory.org/public_html/data/htaccesstest.txt”
    I have tried everything imaginable. Any help would be much appreciated.

Welcome to the community, @AdamThompson

Did you install Virtualmin as per the official documentation at Automated Virtualmin Installation – Virtualmin

And most importantly, was Virtualmin installed on a server with a freshly installed OS, with nothing added to it before Virtualmin was installed?

Yes I followed the documentation to the letter. On a Fresh minimal install of Debian 10

The next thing to check, based on the error message that you have received, would be the file home/pancakefactory/domains/flip.pancakefactory.org/public_html/data/htaccesstest.txt

Is there anything in it which might trigger the error? Could you disable .htaccess (maybe by renaming it or in any other way you like) and see if this error goes away?

home/pancakefactory/domains/flip.pancakefactory.org/public_html/data/htaccesstest.txt contains the following

Generated by Nextcloud on 2021-11-21 05:51:48

Section for Apache 2.4 to 2.6

Require all denied Order Allow,Deny Deny from all Satisfy All

Section for Apache 2.2

<IfModule !mod_authz_core.c>
<IfModule !mod_access_compat.c>

Order Allow,Deny
Deny from all

Satisfy All

Section for Apache 2.2 to 2.6


IndexIgnore *

~

I just mv .htaccess to .htaccess.bak
But it didn’t change the message. But it did produce a new message in the apache logs
“[Sun Nov 21 05:58:12.348451 2021] [access_compat:error] [pid 28494:tid 140708871866112] [client 209.141.34.220:38088] AH01797: client denied by server configuration: /home/pancakefactory/domains/flip.pancakefactory.org/public_html/config/getuser”

Disabling htaccess solved that particular error so we have established that it is a htaccess directive (and not Virtualmin or any other misconfiguration) that had triggered the error; but now there is another htaccess is a subdirectory which is triggering a similar error.

You must find within the htaccess file that you have disabled the directive which is triggering the error and disable the offending directive.

I have no experience with NextCloud so you will have to figure this out on your own. After you do that, you might have to edit recursively all htaccess files in all subdirectories and disable the offending directive from those too.

/data directory in nextcloud is private. no direct/public access should be allowed. check your ‘datadirectory’ in nextcloud config and your apache virtualhost for nextcloud…
probably the same for /config directory and htaccesstest.txt (this one should probably be renamed to .htaccess.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.