I'm trying to enable a service on my home server that has a different document root than my main site. I can't figure out how to edit the site .conf
files so that I can run both the main site and the new service.
My use case: I've got a home server running Ubuntu 16.04.1 and Apache 2. I can browse to my site at ceres.local
. I also installed OpenProject 6.1. After the install completes, I can browse to that service at ceres.local/openproject
, but now browsing to ceres.local
returns a 403 Forbidden
.
I checked my sites-enabled
, and I see that the 000-default.conf
is no longer listed, just openproject.conf
. So, I ran a2ensite 000-default.conf
and service apache2 reload
. Now, I can browse to ceres.local
, but ceres.local/openproject
returns a 404 Not Found
.
How do I get both 'ceres.local' and 'ceres.local/openproject' to serve properly with the two .conf
files below? Note the different document roots.
My 000-default.conf
reads as follows:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ServerName ceres.local
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
And my openproject.conf
reads as follows:
Include /etc/openproject/addons/apache2/includes/server/*.conf
<VirtualHost *:80>
ServerName ceres.local
DocumentRoot /opt/openproject/public
ProxyRequests off
Include /etc/openproject/addons/apache2/includes/vhost/*.conf
ProxyPass /openproject/ http://127.0.0.1:6000/openproject/ retry=0
ProxyPassReverse /openproject/ http://127.0.0.1:6000/openproject/
</VirtualHost>