Why is apache allowing access to ownCloud directory outside of DocumentRoot?
-
21-12-2019 - |
Question
The setup...
I am experiencing an odd issue with my Debian installation of ownCloud. I have set my DocumentRoot as /var/www/docroot/ and made it accessible only via ssl.
I have installed ownCloud using apt-get and its default location is /var/www/owncloud
There is no directory or symlink named owncloud inside /var/www/docroot/
I do not have a VirtualHost (that I can see) that allows access to /var/www/owncloud
The problem...
When I go to myserver.com/owncloud, it actually serves up the owncloud directory. Clearly I have missed something, but I am not seeing what it.
Solution
The owncloud package includes its own config file: /etc/apache2/conf-available/owncloud.conf, the configuration that makes /var/www/owncloud available is probably there.
You can disable this file using a2disconf and then set up your own customized config in the virtualhost file.