uwsgi --ini uwsgi.ini命令uwsgi启动不了,错误提示如下,测试是可以运行uwsgi的,nginx页面也正常
来源:10-16 支付宝接口和vue联调-2
慕容6821231
2018-08-01
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.
写回答
1回答
-
bobby
2018-08-03
如果出现了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目录下
022018-08-06
Python前后端分离开发Vue+Django REST framework实战
Django REST framework课程视频,RESTFul API前后端分离开发
2873 学习 · 2457 问题
相似问题