我已根据here说明设置了我的网站。
但是,当我转到我的nginx sites-available设置中指定的URL时,我只获得默认的nginx页面(“welcome to nginx!”)。我试过看this question,但即使删除/ etc / nginx / sites-enabled / default似乎也没有做任何事情。
我的/ etc / nginx / sites-available / eng_blog文件:
server {
listen 80;
server_name eng.camdar.io;
location = /favicon.io {access_log off; log_not_found off;}
location /static/ {
root /root/eng_blog;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/root/eng_blog/eng_blog.sock
}
}
我的/etc/uwsgi/sites/eng_blog.ini
[uwsgi]
project = eng_blog
base = /root
chdir = %(base)/%(project)
home = %(base)/Env/%(project)
wsgi-file = eng_blog/wsgi.py
master = True
processes = 5
socket = %(base)/%(project)/%(project).sock
chmod-socket = 666
uid = www-data
gid = www-data
vacuum = true
/etc/init/uwsgi.conf
description "uWSGI application server in Emperor mode"
start on runlevel [2345]
stop on runlevel [!2345]
setuid root
setgid www-data
exec /usr/local/bin/uwsgi --emperor /etc/uwsgi/sites
教程声称,在将/ etc / nginx / sites-enabled / eng_blog符号链接到/ etc / nginx / sites-available / eng_blog后,事情应该“正常”,但我仍然看到默认的Nginx屏幕。帮助
编辑:
我通过在nginx.conf中包含sites-enabled来解决上述问题。但是,现在uwsgi似乎得到了权限被拒绝的错误,这很奇怪,因为我很确定我设置了所有的权限。