Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

there is a blog hosted on one machine (apache) (currently at blog.domain.com) and we'd like to move it to domain.com/blog. dns for domain.com is pointed at an haproxy machine load balancing a few nginx app servers. the machine hosting the blog is not behind that load balancer.

considering i have complete control over the configuration of everything, whats the most straightforward way to get this to submit to my will and have the blog served from domain.com/blog?

share|improve this question
1  
You can not achieve this without sending the traffic to your load balancer because the domain is pointing to your load balancer. If you send the traffic to your nginx load balancer then you can easly rewrite the /blog url. –  Hex Nov 1 '12 at 22:43

1 Answer 1

There are few possible ways to achieve this. The best one would be to setup a reverse proxy on HAProxy and use acl to divert /blog traffic to the backend blog server.

http://cbonte.github.com/haproxy-dconv/configuration-1.5.html#7

Perhaps, have a look at this example setup http://steven.4bits.eu/2010/07/using-haproxy-as-reverse-proxy.html

You may not need to change the ports as you already mentioned that the blog is hosted on a separate server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.