nginx gunicorn没有在django项目的端口80上运行

时间:2015-03-05 08:22:23

标签: django ubuntu amazon-web-services nginx gunicorn

我正在为django应用程序设置一个生产服务器。我可以在nginx和gunicorn的帮助下运行它。问题是,当我在没有8000或8001的端口上运行它时,它运行正常。但是当我在端口80上运行它时,它没有连接。这是我正在使用的命令(来自命令行):

gunicorn abcd.wsgi:application --bind = 0.0.0.0:80(not working)

gunicorn abcd.wsgi:application --bind = 0.0.0.0:8000(working) 因为当我在浏览器中打开我的网站时,我必须给出端口号,例如 - abcd.com:8000

命令输出是:

1. netstat -tulpn | grep :80

   tcp    0    0.0.0.0:80    0.0.0.0:*    LISTEN    27506/nginx

nginx conf文件是:

 server {
    listen 80; 
    server_name abcd.com;
    location / { 
       proxy_pass http://0.0.0.0:8000;
    }

location /static/ {
    alias /home/ubuntu/staticvirt/test_project/staticfiles/;
   }
}

0 个答案:

没有答案
相关问题