I’m new to NextCloud and has just installed it on my own server. I really like it but I have problems setting up the nextcloud.conf (Apache2 Site configuration) to directing to my subdomain: https://cloud.mydomain.net
I’m also new to Apache so i’m sorry if it is a simple Apache configuration question. I have searched online but can’t find a solution that works for me.
Here is my setup:
Running my nextcloud server on a Debian 10 machine
The nextcloud folder is located at /var/www/html/nextcloud
My nextcloud.conf contains this
<VirtualHost *:80>
ServerName cloud.mydomain.net
Redirect permanent / https://cloud.mydomain.net
</VirtualHost>
<VirtualHost *:443>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/nextcloud/
ServerName cloud.mydomain.net
Alias /nextcloud "/var/www/html/nextcloud/"
<Directory /var/www/html/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"
</IfModule>
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/html/nextcloud
SetEnv HTTP_HOME /var/www/html/nextcloud
</Directory>
</VirtualHost>
What do you get when you laod https://cloud.mydomain.net?
If I get a servername/domain/subdomain for the nextcloud itself (what i highly recommend) then i leave the Alias line out.
## 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.
If I remove the Alias line. I get a 500 Internal server Error page.
I put them between ServerName and Alias, but I dont think the place realy matters.
Then you can read the errorlog sudo less /var/log/apache2/nextcloud_error.log
Please share the content with us - perhaps even with the solution to it
[Sun Jun 07 13:02:21.573603 2020] [core:error] [pid 20230] [client 192.168.1.1:22435] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Sun Jun 07 13:02:23.803628 2020] [core:error] [pid 20231] [client 192.168.1.1:1500] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Sun Jun 07 13:02:31.678932 2020] [core:error] [pid 20233] [client 192.168.1.1:58831] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
I’d recommend to put nextcloud in /var/www/nextcloud directly and chang the nextcloud.conf file. You can then disable the site 000-default.conf by sudo a2dissite 000-default.conf. That site is in the folder /var/www/html.