我正在尝试在NGINX之后使用uWSGI运行flask应用程序。
这是NGINX的配置。
server {
location / {
try_files $uri @app;
}
location @app {
client_body_buffer_size 2M;
client_max_body_size 2M;
include uwsgi_params;
uwsgi_pass unix:///tmp/uwsgi.sock;
uwsgi_ignore_client_abort on;
}
# Configure NGINX to deliver static content from the specified folder
location /static {
alias /app/static;
}
}
但是,在重新启动NGINX时,它会抛出错误:-
nginx: [emerg] "server" directive is not allowed here in /etc/nginx/nginx.conf:1