Nginx:将Django部署到AWS EC2实例时502错误的网关

时间:2019-01-16 09:35:42

标签: django nginx amazon-ec2 nginx-config

我正在尝试使用Nginx在AWS EC2实例上部署Django网站。我收到以下错误。

*1 connect() failed (111: Connection refused) while connecting to upstream, client: **.***.***.***, , server: **.**.***.*, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8000/", host: "*.amazonaws.com"

/etc/nginx/sites-available文件夹中,我有一个具有以下配置的文件

server{
listen 80;
server_name your_public_ip;
location = /favicon.ico { access_log off; log_not_found off; }
location /static/ {
    root /home/ubuntu/mySiteFolder;
}
location / {
    include proxy_params;
   proxy_pass http://127.0.0.1:8000;
}

}

我犯的错误在哪里?预先谢谢你。

0 个答案:

没有答案