M
M
michaelvasilchenko2018-08-31 12:51:20
linux
michaelvasilchenko, 2018-08-31 12:51:20

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>

Second:
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

1 answer(s)
A
Alexander, 2018-09-01
@UPSA

These are the 2nd parts of one config....the parts are not complete....
don't touch it yet....
Try it...
Set up internal DNS. Let it issues an external IP to the internal name. Then everyone will go to the external IP.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question