gunicon
先安装epel
yum install nginx.x86_64
配置nginx
/etc/nginx/conf.d/virtual.conf
server {
listen 192.168.17.139:8000;
server_name node01;
location /static/admin/ {
root /usr/local/lib/python2.7/site-packages/django/contrib/admin/;
index index.html index.htm;
}
location / {
proxy_pass http://localhost:8000;
}
}
pip install gunicon
把这两个添加开机启动
vim /etc/rc.local
cd /opt/simplecmdb
#要在这目录下执行以下gunicorn命令
gunicorn simplecmdb.wsgi:application -D
chkconfig nginx on
posted on 2018-01-10 21:54 linux-paul 阅读(191) 评论(0) 编辑 收藏 举报