mod_proxy Fowarding Based on Request Host Header

Posted by zigzagip on Server Fault See other posts from Server Fault or by zigzagip
Published on 2012-08-29T19:25:21Z Indexed on 2012/09/01 15:39 UTC
Read the original article Hit count: 170

Filed under:
|

Lets say I have 3 URLs and they all point to the same reverse proxy. I would like to have the requests being forwarded to the web servers behind the proxy based on the host header:

webfront1.example.com > reverseproxy.example.com > backend1.example.com
webfront2.example.com > reverseproxy.example.com > backend2.example.com
webfront3.example.com > reverseproxy.example.com > backend3.example.com

Based on what I have read, I can configure reverseproxy.example.com/webfront1 > backend1.example.com, reverseproxy.example.com/webfront2 > backend2.example.com, etc.

I am wondering if proxy based on host header is even possible or if I used the wrong approach entirely.

© Server Fault or respective owner

Related posts about apache2

Related posts about mod-proxy