I am using nginx as a proxy to a couple of flask apps, with uwsgi as the middleware. Here's my nginx config for a test app.
server {
listen 80;
server_name test.myapp.com www.test.myapp.com;
charset utf-8;
client_max_body_size 250M;
location / { try_files $uri @testapp; }
location @testapp {
include uwsgi_params;
uwsgi_pass unix:/tmp/testapp_uwsgi.sock;
}
location /forecaster/components/ {
alias /opt/test/client/app/components/;
}
}
I'm pretty sure that nginx is not actually serving the static files though, even if I comment out the location
block, the files are getting served from something. I see 200's in the nginx log, as well as 200's in the uWsgi logs. How can you tell which one is serving the static files? I suppose that the flask app could be serving them as well?
/opt/test/client/app/components/ certainly exists, and is readable to others. Is there some way to force uwsgi NOT to handle these requests?