我试着用Nginx和Gunicorn部署一个Django项目,有this tutorial个.我做了所有的待办事项,但是,当我使用以下代码创建/etc/nginx/sites-available/myproject
文件时:
server {
listen 80;
server_name server_domain_or_IP;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
root /home/sammy/myproject;
}
location / {
include proxy_params;
proxy_pass http://unix:/home/sammy/myproject/myproject.sock;
}
}
然后运行sudo nginx -t
查找错误,我得到这个错误:
nginx: [emerg] open() "/etc/nginx/proxy_params" failed (2: No such file or directory) in /etc/nginx/sites-enabled/myproject:11
nginx: configuration file /etc/nginx/nginx.conf test failed
我怎么才能解决这个问题呢?