problem with nginx reverse proxy to apache2

Posted by FurtiveFelon on Server Fault See other posts from Server Fault or by FurtiveFelon
Published on 2010-10-12T05:47:58Z Indexed on 2011/11/12 9:57 UTC
Read the original article Hit count: 521

Filed under:
|

I am trying to setup a reverse proxy system where nginx sits at the front handling all the requests from the internet and apache2 sits at the back handling all the dynamic content. I can setup virtualhost in nginx based on my domains, but because apache2 is listening only on 127.0.0.1:8080 (not outside facing), i'd like to still have virtualhost based on domain (or whatever can be passed from nginx to apache) and change the dynamic content based on it.

Basically, I have a nginx config in sites_available and sites_enabled that basically says for location /{proxy_pass http://127.0.0.1:8080/;}. So currently i don't think there is any way of detecting which domain we have on the outside for apache.

I am almost exactly following this guide to set it up: http://tumblr.intranation.com/post/766288369/using-nginx-reverse-proxy So code and others are almost the same.

Any one have any ideas?

Jason

© Server Fault or respective owner

Related posts about apache2

Related posts about nginx