supervisor管理uwsgi程序
使用supervisor管理uwsgi进程相关配置
1.下载安装supervisor(此示例在ubuntu环境)
apt-get install supervisor
安装成功后,会在/etc/supervisor目录下,生成supervisord.conf配置文件
可以在conf.d 目录下根据自己的需求来创建程序对应的.conf文件(该目录下文件都已被supervisord.conf包含)
2.配置相关文件
示例配置文件
[unix_http_server]
file=/var/run/supervisor.sock ; (the path to the socket file)
chmod=0700 ; sockef file mode (default 0700)
[inet_http_server] ;HTTP服务器,提供web管理界面
port=127.0.0.1:9001 ;Web管理后台运行的IP和端口,如果开放到公网,需要注意安全性 开放公网需要设置公网IP
username=username ;登录管理后台的用户名
password