Sydney 08/2008

DSC_0128.JPG

It sometimes amazes me how stupid I am. I forgot to maintain my DNS records and my servers were down for couple of hours.

On another note, please make sure you check out Security Now! podcast over at twit.tv on DNS. It’s really interesting and should give you some insight as to why it is important to keep your eyes on DNS servers.

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.