Define the urls you want to re-direct to a different server:
ServerName www.myExternalDoomianName.com ProxyPass / http://myInternalDnsName/ ( or ip address ) ProxyPassReverse / http:// myInternalDnsName / (or ip address ) ProxyPreserveHost on
ProxyPreserveHost keeps the host headers intact so the internal sever can still use virtual websites.
Enable the site ( debian/ubuntu specific )
A2ensite myReverseProxySites
Need some extra bits for apache:
apt-get install libapache2-mod-proxy-html a2enmod proxy a2enmod proxy_html a2enmod headers a2enmod proxy_connect a2enmod proxy_balancer
Restart apache
/etc/init.d/apache2 restart
If something isn’t working start looking in the logs:
tail -f /var/log/apache2/error.log

Can you set this up on Windows running Apache?
ReplyDelete@Damian
ReplyDeleteAbsolutely. It's just as easy on Windows.
Hi, I am planning to do a similar task. Reverse proxy with apache on ubuntu server to win 3k3 server. What version of ubuntu did you use. Will I be better off deploying current ubuntu server 9.04 or use 8.04?
ReplyDeleteAnd did the windows sites work ok?
I used 8.04 at the time. 3 out of the 5 servers behind this proxy were Windows so the OS of the server behind the proxy doesn't matter.
ReplyDeleteSince then I have moved this proxy to Apache on a Windows server it has been running faultlessly.
I thank you for the information and articles you provided
ReplyDeletecool, please guidance so that I can create a blog like yours
ReplyDeletehttps://bayanlarsitesi.com/
ReplyDeleteKayseri
Sinop
Kilis
Hakkari
6XT5
EskiĹźehir
ReplyDeleteAdana
Sivas
Kayseri
Samsun
XDTAVZ