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.
ayam saung
ReplyDeleteI thank you for the information and articles you provided
ReplyDeletecool, please guidance so that I can create a blog like yours
ReplyDeleteYour Content is amazing and I am glad to read them. Thanks for sharing the Blog.this blog is very helpful information for every one.
ReplyDeleteWebsite Development Company in Gwalior
Web Development Company in Gwalior
Marriage Garden in Gwalior
Facebook Discontinued Marketplace Vehicle Listings? How Can We Help?
New and Used Cars for Sale in USA
Lubbock moving company
Online Auto Auctions for Car Dealers
Best CRO and Top CMO Company in New Jersey USA