Is there a problem with the nginx+uwsgi configuration?

this is the configuration of 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;            
    }
}

this is the configuration of uwsgi:

[uwsgi]                                                     
socket = 127.0.0.1:8000                         
plugins = python                                        
chidir = /PycharmProjects/Flask                                   
wsgi-file = app.py                                       
callable = app

enter the command to restart nginx and report an error:

root@XULU-PC:/-sharp 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:/-sharp

enter nginx-t prompt:

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-sharp5214: 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-sharp5214: 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

View nginx.log prompt;

2018/06/28 02:10:14 [emerg] 4960-sharp4960: unexpected end of file, expecting ";" or "}" in /etc/nginx/sites-enabled/nohup.out:2
2018/06/28 02:10:38 [emerg] 4996-sharp4996: unexpected end of file, expecting ";" or "}" in /etc/nginx/sites-enabled/nohup.out:2

enter systemctl status nginx.service error prompt:

root@XULU-PC:/-sharp 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)

excuse me, where is the problem?

Mar.22,2021
Menu