Reverse proxy : preserving base url

mastah nginx-forum at nginx.us
Sun Apr 14 02:35:47 UTC 2013


Hi.

I'm struggling since about 2days to create a reverse proxy with nginx.
Here is my situation :
   I've a sub domain which we will call : sub.example.com
   I've an internal application at 127.0.0.1:9090/app

What I would like :
   I would like to proxy sub.example.com to 127.0.0.1:9090/app and i want to
keep my URL as sub.example.com
   So far I've done countless try without success.

The optimal situation would be that when I do :
   http://sub.example.com/ I get the content from http://127.0.0.1:9090/app
but without any change in the sub domain URL.

So for example if the internal app has
http://127.0.0.1:9090/app/magical.css, my sub domain should be
http://sub.example.com/magical.css (without app/)

Thanks in advance to anyone that is willing to help me.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,238350,238350#msg-238350



More information about the nginx mailing list