Answer the question
In order to leave comments, you need to log in
Apache2 accepts requests inside and outside the network differently, how to fix this?
There is a nextcloud server that users access inside the network and outside it. Inside the network, a request to cloud.example.com returns the Apache page, and the desired page is reached by going to cloud.example.com/nextcloud
Outside the network, a request to cloud.example.com returns the desired page.
There are two configs, which one works, I don’t know, because if you disable any of them, then nothing works
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin [email protected]
DocumentRoot /var/www/nextcloud
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/fury.ltd
SSLCertificateKeyFile /etc/apache2/ssl/private.key
SSLCertificateChainFile /etc/apache2/ssl/chain.crt
ServerName cloud.fury.ltd
</VirtualHost>
</IfModule>
Alias /nextcloud "/var/www/nextcloud/"
SSLCertificateFile /etc/apache2/ssl/example
SSLCertificateKeyFile /etc/apache2/ssl/private.key
SSLCertificateChainFile /etc/apache2/ssl/chain.crt
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question