社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  NGINX

Nginx部署相关

海啦啦楼 • 4 年前 • 254 次点击  

Nginx部署相关

uwsgi

cd app/ 重启uwsgi,找到uwgi文件位置
cd uwsgi/
uwsgi --ini uwsgi.ini 第一次开启,记得 workon 进入虚拟界面
uwsgi --stop uwsgi.pid 停止
uwsgi --reload uwsgi.pid 开启后重启
tail -f uwsgi.log
ps -ef | grep uwsgi (ps -ef查看进程)

ps [选项]
linux系统PS命令,按CPU、内存使用率对进程排序

参数 意义
-e 显示所有进程,环境变量
-f 全格式
-h 不显示标题
-l 长格式
-w 宽输出
a 显示终端上地所有进程,包括其他用户地进程
r 只显示正在运行地进程
x 显示没有控制终端地进程

Redis指令:清空 flushall

nginx

ps -ef | grep nginx 查看nginx开启状态,虚拟环境:image-tool-yafang
kill -9 端口 杀死线程
workon image_tool 进入虚拟环境
nginx -c /usr/local/nginx/conf/image_tool.conf 重启nginx
vim /usr/local/nginx/conf/image_tool.conf

nginx配置文件

server {
    listen 8888;
    server_name 106.37.74.133;

    location / {
        include uwsgi_params;
        uwsgi_pass localhost:3032;
        uwsgi_param UWSGI_MODULE manager;
        uwsgi_param UWSGI_CALLABLE app;
    }
    location /static {
        alias /image-tool-yafang/processRiver_20190314/app/static/;
    }   
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/47895
 
254 次点击