I've got about 5 web applications on different servers running on my LAN, which are all listening to port 80
I would like to make them accessible from the internet by setting up an Apache reverse proxy on my main webserver, which is running on Ubuntu 16.04
Changing their ports and then portfordwarding is not a really good option, since there are a bunch of devices that would need reconfiguration. Plus I would like to keep it user friendly, manually writing ports isn't
So basically, I want to redirect requests the following way:
www.mydomain.com/server3
should redirect to 192.168.1.3:80
www.mydomain.com/server4
should redirect to 192.168.1.4:80
And so on
For now, I followed these instructions: https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension
After installing and enabling the requeried modules, I added the following lines to the `/etc/apache2/sites-enabled/000-default.conf' file:
<VirtualHost *:80>
ProxyPreserveHost On
# Servers to proxy the connection, or;
# List of application servers:
# Usage:
# ProxyPass / http://[IP Addr.]:[port]/
# ProxyPassReverse / http://[IP Addr.]:[port]/
# Example:
ProxyPass "/server3" "http://192.168.1.3:80"
ProxyPassReverse "/server3" "http://192.168.1.3:80"
ServerName pacs
</VirtualHost>
But it didn't have any effect, same goes for this:
<VirtualHost *:80>
ProxyPreserveHost On
ProxyPass / http://192.168.1.3:80
ProxyPassReverse / http://192.168.1.3:80
ServerName pacs
</VirtualHost>
Am I missing something?