折腾:
期间,把整个nginx配置改为
location / { try_files $uri @yourapplication; } location @yourapplication { include uwsgi_params; uwsgi_pass unix:/tmp/uwsgi.sock; } |
然后再去:
(SIPEvents) ➜ SIPEvents service nginx restart nginx: [emerg] “location” directive is not allowed here in /etc/nginx/conf.d/default.conf:15 nginx: configuration file /etc/nginx/nginx.conf test failed |
搜:
nginx: [emerg] “location” directive is not allowed here in
uwsgi nginx: [emerg] “location” directive is not allowed here in
uwsgi – Can’t figure out how to serve static files with Nginx – Stack Overflow
nginx: [emerg] unknown directive “http” – Server Fault
nginx无痛升级并增加nginx-gridfs模块支持 – 奋斗 – 博客频道 – CSDN.NET
用uWSGI替代fastcgi部署django应用 – ichuan.net
改为:
server{ location / { try_files $uri @app; } location @app { include uwsgi_params; uwsgi_pass unix:/tmp/uwsgi.sock; } } |
即可。
转载请注明:在路上 » [已解决]nginx出错:nginx emerg location directive is not allowed here in