Questions about proxy_pass and internal directives

Valentin V. Bartenev ne at vbart.ru
Thu Oct 18 20:23:30 UTC 2012


On Thursday 18 October 2012 23:54:43 mrtn wrote:
> A correction to my earlier post: the request in my first question above
> should be for "mysite.com/foo/bar/sth/sth.html", and there is a
> corresponding file on the filesystem:
> "/home/www/mysite/static/foo/bar/sth/sth.html".
> 
> Just tried something different, with this config:
> 
> root /home/www/mysite/static;
> 
> location /foo/bar/ {
>                 internal;
>                 proxy_pass              http://127.0.0.1:8080;
>                 proxy_redirect          off;
> }
> 
> request to "mysite.com/foo/bar/sth" will return 404, and I can see that the
> request does not even get proxied to the application server. In addition,
> this access is not logged in error log but in the access log of nginx.
> However, request to "mysite.com/foo/bar/sth/sth.html" is served fine,
> despite of using "internal" directive.
> 

Is this the only one "location" that you have in your "server" block?

 wbr, Valentin V. Bartenev

--
http://nginx.com/support.html
http://nginx.org/en/donation.html



More information about the nginx mailing list