This post builds on top of this post where we set up reverse proxy in Apache to redirect traffic to a backend of our choice. In this guide we will swap out the default apache site on port 80 with our proxy server. We edit 001-mysite.conf
to use port 80 and forward all paths to our backend.
<VirtualHost *:80>
ProxyPass "/" "http://127.0.0.1:8080/"
ProxyPassReverse "/" "http://127.0.0.1:8080/"
</VirtualHost>
Notice that we do not add "listen 80" as the server is already configured to listen to this port.
As before we want to enable our site.
$ a2ensite 001-mysite.conf
If we reloaded the server now, this configuration would work, but to not create confusion, we will disable the default configuration.
$ a2dissite 000-default.conf
And then reload the apache service.
$ service apache2 restart
Now our proxy server is accessible on *:80.
As in the previous guide we will use Vagrant to provision our server. We remove the port-forwarding between port :4568 and port :5000 in vagrantfile, and we add the line disabling the default Apache site before enabling our own site in bootstrap.sh
.