For last two days, I’ve been having a bitch of time trying to get Apache reverse proxy to work correctly with my backend server. It happens that the when I hit the URL for my wiki, it exposes the backend server’s address and port. In fact, it was just redirecting it rather than serving up the pages.
I finally got it to work correctly. Here’s my solution.
Front-end Apache (my load balancer):
Apache Config - within VirtualHost directive
ServerName www.yourdomain.com
ServerAlias yourdomain.com
ServerAlias wiki.yourdomain.com
ProxyPreserveHost On
BalancerMember http://{host name}:{port number}
ProxyPass / balancer://{balancer name}/
ProxyPassReverse / balancer://{balancer name}/
Backend Apache (real server with MediaWiki)
Apache Config - within VirtualHost directive
ServerName {host name}
ServerAlias www.yourdomain.com
ServerAlias wiki.yourdomain.com
I would love to explain this explain how this fixes the issues, but I’m just too damn tired. If you need further explanation, post your comment here and I’ll respond to it.
You must be logged in to post a comment.

No comments
Comments feed for this article
Trackback link
http://www.joonyou.com/2008/07/30/apache-reverse-proxy-with-mediawiki/trackback/