Francis Daly francis at
Wed Dec 30 17:30:16 UTC 2015

On Wed, Dec 30, 2015 at 02:50:24PM +0800, 天河石 - 谢金鹏 wrote:

Hi there,

> In my local machine browser, I want to open http://localhost/abc to proxy a real as well as proxying all child resources such as
> http://localhost/abc/bcd/a.html to proxy 
> http://localhost/abc/bc.html to proxy 
> ...
> How do I perform it?

proxy_pass (

You should reverse-proxy to a server that you control.

Making things work where the url hierarchies differ -- /abc/ in nginx
being the same as / in the upstream server -- can be difficult. But
sometimes it works.

  location ^~ /abc/ {

and then try accessing http://localhost/abc/bc.html and see what you
get back.

Francis Daly        francis at

More information about the nginx mailing list