nginx+uwsgi配置出现问题?
这个是nginx的配置:
server {
listen 80;
server_name 127.0.0.1;
charset utf-8;
index index.html index.htm index.nginx-debian.html;
client_max_body_size 75M;
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8000;
uwsgi_param UWSGI_PYTHON /PycharmProjects/Flask/venv;
uwsgi_param UWSGI_CHDIR /PycharmProjects/Flask;
uwsgi_param UWSGI_SCRIPT run:app;
}
}
这个是uwsgi的配置:
[uwsgi]
socket = 127.0.0.1:8000
plugins = python
chidir = /PycharmProjects/Flask
wsgi-file = app.py
callable = app
输入命令重新启动nginx报错:
root@XULU-PC:/# sudo service nginx start
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
root@XULU-PC:/#
输入nginx -t提示:
nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
2018/06/28 02:13:20 [warn] 5214#5214: the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
2018/06/28 02:13:20 [emerg] 5214#5214: open() "/etc/nginx/sites-enabled/nohup.out" failed (13: Permission denied) in /etc/nginx/nginx.conf:62
nginx: configuration file /etc/nginx/nginx.conf test failed
查看nginx.log 提示;
2018/06/28 02:10:14 [emerg] 4960#4960: unexpected end of file, expecting ";" or "}" in /etc/nginx/sites-enabled/nohup.out:2
2018/06/28 02:10:38 [emerg] 4996#4996: unexpected end of file, expecting ";" or "}" in /etc/nginx/sites-enabled/nohup.out:2
输入systemctl status nginx.service错误提示:
root@XULU-PC:/# systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: en
Active: failed (Result: exit-code) since 四 2018-06-28 02:10:38 CST; 2min 1s
Process: 4996 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process
6月 28 02:10:38 XULU-PC systemd[1]: Starting A high performance web server and a
6月 28 02:10:38 XULU-PC nginx[4996]: nginx: [emerg] unexpected end of file, expe
6月 28 02:10:38 XULU-PC nginx[4996]: nginx: configuration file /etc/nginx/nginx.
6月 28 02:10:38 XULU-PC systemd[1]: nginx.service: Control process exited, code=
6月 28 02:10:38 XULU-PC systemd[1]: Failed to start A high performance web serve
6月 28 02:10:38 XULU-PC systemd[1]: nginx.service: Unit entered failed state.
6月 28 02:10:38 XULU-PC systemd[1]: nginx.service: Failed with result 'exit-code
lines 1-12/12 (END)
请问是哪里的问题?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论