Debian 8 Setting Reverse Proxy With Apache2

Updated . Posted . Visible to the public.

Load modules

#a2enmod proxy
#a2enmod proxy_http

Reload Apache

#/etc/init.d/apache2 force-reload

Virtualhost Configuration

#cd /etc/apache2/sites-available/
#vi website

<VirtualHost *:80>
        ServerName website.no-ip.org
        ProxyPass       /       http://192.168.x.y/
        ProxyPassReverse        /       http://192.168.x.y/
</VirtualHost>


#vi websitehttps
<VirtualHost *:443>
        ServerName 		website.no-ip.org
        ProxyPass       	/       http://192.168.122.9:8080/guacamole/
        ProxyPassReverse        /       http://192.168.122.9:8080/guacamole/
</VirtualHost>

Disable Default

#a2dissite default

Enable new Virtualhost

#a2ensite website
#a2ensite websitehttps

Restart Apache

#/etc/init.d/apache2 restart

Ok!

Profile picture of L3UNIX
L3UNIX
Last edit
L3UNIX
Posted by L3UNIX to L3UNIX's deck (2016-08-23 23:46)