Questions about proxy_pass and internal directives
mrtn
nginx-forum at nginx.us
Thu Oct 18 19:54:43 UTC 2012
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.
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,231998,231999#msg-231999
More information about the nginx
mailing list