It is a practical example where the reverse proxy is on internet and will redirect /phpmyadmin/ to an internal server.
I like to use logical volumes for the machines.
lvcreate -L 2G rproxy /dev/system
Just for this time "-cdrom image.iso" and "-boot d" is needed to start installation.
kvm /dev/system/rproxy -net nic -net tap -cdrom debian-testing-i386-netinst.iso -boot d
It is a basic Debian installation that includes network configuration.
* Web server
• SSH server
• Basic utilities
It is an Apache module that will re-write URL links inside HTML.
apt-get install libapache2-mod-proxy-html
Apache has a tool to do that, basically it creates a link between "available" and "enable" under configuration directory.
lvcreate -L 2G rproxy /dev/system
It is the fastest way. I would recommend you to create a new one according your needs.
vi /etc/apache2/sites-enabled/000-default
ProxyHTMLLogVerbose On
LogLevel Debug
ProxyRequests off
SetOutputFilter proxy-html
ProxyHTMLExtended On
ProxyHTMLMeta On
ProxyPass /phpmyadmin/ http://192.168.1.15/
<Location /phpmyadmin/>
ProxyHTMLURLMap / /phpmyadmin/
ProxyPassReverse http://192.168.1.15/
ProxyPassReverseCookiePath / /phpmyadmin/
</Location>
Needed to apply changes.
/etc/init.d/apache2 restart
Under this directory you will find useful logs.
tail -f /var/log/apache2/error.log