Django &引用;“上游”;来自nginx的错误。。。can';我想不出来
尝试启动nginx时出现以下错误: /$sudo nginx-t 在/etc/nginx/sites enabled/catalog\u nginx.conf:4中不允许使用nginx:[emerg]“上游”指令 我的应用程序根目录中有一个文件“catalog\u nginx.conf”:Django &引用;“上游”;来自nginx的错误。。。can';我想不出来,django,nginx,amazon-ec2,uwsgi,Django,Nginx,Amazon Ec2,Uwsgi,尝试启动nginx时出现以下错误: /$sudo nginx-t 在/etc/nginx/sites enabled/catalog\u nginx.conf:4中不允许使用nginx:[emerg]“上游”指令 我的应用程序根目录中有一个文件“catalog\u nginx.conf”: # catalog_nginx.conf # the upstream component nginx needs to connect to upstream django { #server u
# catalog_nginx.conf
# the upstream component nginx needs to connect to
upstream django {
#server unix:///home/ec2-user/catalog/catalog.sock; # production
server 127.0.0.1:8001; # testing
}
# configuration of the server
server {
listen 8000;
server_name 54.redacted;
charset utf-8;
# max upload size
client_max_body_size 75M;
# Django media
location /media {
alias /home/ec2-user/catalog/media/; # media files
}
location /static {
alias /home/ec2-user/catalog/static/; # static files
}
# all non-media requests
location / {
uwsgi_pass django;
include /home/ec2-user/catalog/uwsgi_params;
}
}
在/etc/nginx/I的'nginx.conf'文件中,在http{}下有以下内容
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*.conf;
我已将这两个文件进行了符号链接
想法?显示文件的基础部分可能有用。这是否有帮助:显示文件的基础部分可能有用。这是否有帮助: