开发者社区> 问答> 正文

阿里云部署django项目(nginx+uwsgi+python3+mysql),部署后无法访问?

阿里云部署django项目(nginx+uwsgi+python3+mysql),部署后无法通过ip+端口访问,想知道原因,感谢 1.本人在阿里云上部署了本地的一个django项目,按照网上的教程部署后,无法通过ip+端口访问 2.安全组规则已经配置 3.nginx配置如下: server { listen 80; server_name 47.96.109.254;


    #access_log  logs/host.access.log  main;

location / { root html; index index.html index.htm; } server_name 47.96.109.254;

        include uwsgi_params;
        uwsgi_pass 127.0.0.1:8001;
    }
    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    #location = /50x.html {
     #   root   html;
    #}

    location /static {
        alias /home/testfk/nginx/static/; #项目静态路径设置
    }

uwsgi配置如下:

[uwsgi]
socket = 127.0.0.1:8001
#chmod-socket = 666
chdir = /home/testfk/
wsgi-file = /home/testfk/testfk/wsgi.py
#touch-reload = /home/testfk
#py-auto-reload = 1
processes = 4
threads = 2
#enable-threads = True
master = true
daemonize = /home/testfk/run.log
#disable-logging = true
pidfile=/home/testfk/uwsgi.pid

用ip+端口访问报错 image.png

遇到了同样的问题,在CSDN看到了,希望阿里云团队能够给出正确、标准的答案~请查看

展开
收起
刘刚_ 2020-05-23 21:13:40 2391 0
1 条回答
写回答
取消 提交回答
  • 剁了悬在空中的那个程序猿

    查看下安全组有没开放该端口

    2020-05-27 18:41:39
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
From Python Scikit-Learn to Sc 立即下载
Data Pre-Processing in Python: 立即下载
双剑合璧-Python和大数据计算平台的结合 立即下载