Nginx+Tornado static files aren't being handled by nginx, why?
I'm trying to set up Tornado server behind nginx proxy, here're the
relevant bits of the configuration:
server {
listen 80;
server_name localhost;
location html/ {
root /srv/www/intj.com/html;
index login.html;
if ($query_string) {
expires max;
}
}
location = /favicon.ico {
rewrite (.*) /html/favicon.ico;
}
location = /robots.txt {
rewrite (.*) /html/robots.txt;
}
location / {
proxy_pass_header Server;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_pass http://localhost:8888;
}
}
I can get to my Python server through nginx, but when I request a static
pages, such as, say login.html, which is located in
/srv/www/intj.com/html/login.html, instead of loading the static file, the
request is forwarded to Tornado, which doesn't know what to make of it.
What did I do wrong?
No comments:
Post a Comment