请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

uwsgi --ini uwsgi.ini命令uwsgi启动不了,错误提示如下,测试是可以运行uwsgi的,nginx页面也正常

thunder lock: disabled (you can enable it with --thunder-lock)

uWSGI running as root, you can use --uid/--gid/--chroot options

*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 

uWSGI running as root, you can use --uid/--gid/--chroot options

*** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 

The -s/--socket option is missing and stdin is not a socket.

https://img1.sycdn.imooc.com//szimg/5b61bd9f00015e0703320124.jpg

https://img1.sycdn.imooc.com//szimg/5b61bda00001b0df21220768.jpg

https://img1.sycdn.imooc.com//szimg/5b61bda10001019710100574.jpg

https://img1.sycdn.imooc.com//szimg/5b61bda100016d8415340782.jpg


10653
收起

正在回答 回答被采纳积分+3

1回答

bobby 2018-08-03 10:45:10

如果出现了nginx的启动页面, 那其实不是uwsgi有没有启动成功的问题, 而是在于需要检查nginx的配置文件,

upstream django {
# server unix:///path/to/your/mysite/mysite.sock; # for a file socket
server 127.0.0.1:8000; # for a web port socket (we'll use this first)
}
# configuration of the server

server {
# the port your site will be served on
listen      80;
# the domain name it will serve for
server_name 你的ip地址 ; # substitute your machine's IP address or FQDN
charset     utf-8;

# max upload size
client_max_body_size 75M;   # adjust to taste

# Django media
location /media  {
    alias 你的目录/Mxonline/media;  # 指向django的media目录
}

location /static {
    alias 你的目录/Mxonline/static; # 指向django的static目录
}

# Finally, send all non-media requests to the Django server.
location / {
    uwsgi_pass  django;
    include     uwsgi_params; # the uwsgi_params file you installed
}
}

nginx配置文件最好按照这里的模式来, 不要找网上的其他配置方式,首先确保我这里的配置能运行成功再去尝试其他配置方式, 记得配置后一定要重启, 而且要将这个文件拷贝到nginx的conf.d目录下

0 回复 有任何疑惑可以回复我~
  • 提问者 慕容6821231 #1
    都试了还是不行,方便远程一下吗
    回复 有任何疑惑可以回复我~ 2018-08-03 20:16:12
  • bobby 回复 提问者 慕容6821231 #2
    你加我qq 442421039
    回复 有任何疑惑可以回复我~ 2018-08-06 11:45:40
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号