The .htaccess file is not working.
After a freshly installed ncp instance, I just deactivated HTTPS (its accessible via nginx on another server through VPN, and access to that server is HTTPS) and I get this. My files are exposed. How can I fix this?
Your data directory and files are probably accessible from the Internet. The .htaccess file is not working. It is strongly recommended that you configure your web server so that the data directory is no longer accessible, or move the data directory outside the web server document root.
I fixed it for now by blocking that route on nginx, so I am not sure if there might be a way around this measure.
nginx? NCP doesn't use nginx.
Please, use the forum for questions and provide information from sudo ncp-report
cheers
@LukasWerfel I too have an nginx reverse proxy in front of the ncp apache. How did you solve this issue?
Ok, found the issue. There is no AllowOverride All in the http virtualhost: https://github.com/nextcloud/nextcloudpi/blob/4a51c1f5e8a33e670a63c4c82f7eae7115b86980/bin/ncp/CONFIG/nc-nextcloud.sh#L175
AllowOverride All is the default.
http://httpd.apache.org/docs/2.2/mod/core.html#AllowOverride
AllowOverride Allis the default.
Not on Debian: https://salsa.debian.org/apache-team/apache2/-/blob/master/debian/config-dir/apache2.conf.in#L153
Oh I see, we do have AllowOverride All in nextcloud.conf, but if you disable HTTP->HTTPS redirection then it wouldn't apply, good catch.