使用uwsgi --http :80 --wsgi-file test.py 在浏览器上无法访问

解决办法:

1,将nginx关闭

nginx -s stop

2,将uwsgi关闭

pkill -f uwsgi

3,重新执行

uwsgi --http :80 --wsgi-file test.py

编写test.py 文件写入:

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return "Hello World"


4,直接浏览器访问地址加端口

 

posted @ 2021-04-20 13:11  JIMfan  阅读(271)  评论(0编辑  收藏  举报