The configuration that solves the problem is:
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:9001;
uwsgi_read_timeout 300;
index index.html index.htm;
}
The reason the above configuration in the question did not work for us because unfortunately in our machine multiple paths had nginx.conf
file. We were working with the conf at the wrong path.
To correctly figure out which path your nginx is picking up the configuration from run:
nginx -V # V is caps
this will have a --conf-path=[]
which will tell you exactly from where it is picking up the configuration from.
I recently found the above nginx -V
to not give the right info. I will leave the above just in case others find it useful.