尝试启动nginx时出现此错误:
/ $ sudo nginx -t
" nginx:[emerg]"上游"这里不允许使用/etc/nginx/sites-enabled/catalog_nginx.conf:4"
我有这个文件" catalog_nginx.conf"位于我的应用程序的根目录:
# 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;
}
}
在' nginx.conf'来自/ etc / nginx /的文件在http {}
下有以下内容include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*.conf;
我已经对这两个文件进行了符号链接。
思想?