Ngnix as Proxy with Multiple Directories Issue

Igor Sysoev igor at
Fri Aug 19 14:56:27 UTC 2011

On Fri, Aug 19, 2011 at 10:51:10AM -0400, ckozler wrote:
> I am not sure what the redirect code would be exactly though I can
> probably snoop and view the headers.  What I mean is--
> I go to my browser and I type
> http://licensing
> And it works - I use this to generate a license for our products and it
> generates a license and I can download it from the HTML link that is
> generated (http://licensing/downloads/license-file.jar - as an example).
>  Now, what if I want to view the directory listing? I type:
> http://licensing/downloads
> What it does then is it brings me to:
> http://licensing/
> Or if I use the FQDN and the similar work flow with
>  it does the following

May be
note the trailing "/".

Try add these

proxy_redirect  /;
proxy_redirect  http://licensing/               /;

By default nginx detects only this redirect:
proxy_redirect /;

Igor Sysoev

More information about the nginx mailing list