我是nginx的新手。
我已经配置了nginx,gunicorn和django。
当我启动nginx时,它给出一个错误,因为,404 Not Found nginx/1.1.19
因为它没有指向django。
现在我需要在conf文件中使用location或root将nginx指向django(使用gunicorn作为中间件)。
谁能告诉我怎么向django指出nginx。
谢谢
我一直在读到关于用金角部署Django的文章,我想试一试。
我找到了至少3种使用gunicorn和django运行服务器的方法:
gunicorn [OPTIONS] [APP_MODULE] # tested locally and worked fine
python managy.py run_gunicorn # also works fine locally
gunicorn_django [OPTIONS] [SETTINGS_PATH] # I have an error due to apps/ location
我有Apache的nginx (提供静态
在这里签出了其他一些类似的问题,但无法诊断该问题。
我的网站偶尔会出现502 Bad Gateway错误。
我在我的错误日志中发现了以下内容。注意,我在Ubuntu 16.04上使用的是VPS服务器,使用的是Gunicorn/NGINX。
2017/02/21 01:08:29 [crit] 1247#1247: *1 connect() to unix:/home/django/chrisblog/chrisblog.sock failed (2: No such file or directory) while connecting to upstream, client: 173.4