这是一条艰辛的路,记录下,没有条理性,不作为教程,只是笔记
用到的命令
启动uwsgi
uwsgi -c /usr/local/django/uwsgi.ini
关闭uwsgi(后面的uwsgi.pid是我本地的文件路径)
uwsgi --stop uwsgi.pid
启动nginx(去到nginx/sbin下)
./nginx -c /usr/local/nginx/conf/nginx.conf
关闭nginx (3选1)
./nginx -s quit
./nginx -s stop
systemctl stop nginx.service
查看进程
ps -ef|grep 进程名
杀死uwsgi的所有进程
killall -s INT uwsgi
查看当前端口
netstat -ntlp
防火墙方面
启动: systemctl start firewalld
查看状态: systemctl status firewalld
禁用,禁止开机启动: systemctl disable firewalld
停止运行: systemctl stop firewalld
踩到的雷
1、不要再虚拟环境下启动uwsgi,如果恰巧你的虚拟环境中也装了uwsgi,那么就算启动成功了,外部客户端也访问不了
--------------------------
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有