美文网首页
gunicorn自启脚本

gunicorn自启脚本

作者: MkTom | 来源:发表于2019-08-29 19:22 被阅读0次
stop on shutdown    # 联网自动启动
respawn        # 意外重启
setuid cxt    # 采用cxt用户执行
chdir /home/cxt/django-blog-tutorial      #  进入指定目录
exec /home/cxt/.virtualenvs/blog_django/bin/gunicorn --bind unix:/tmp/myblog.socket blogproject.wsgi:application
# 执行进程

咨询系统gunicorn

respawn        # 意外重启

setuid tom    # 采用tom用户执行
chdir /home/tom/0326/diversionSystem      #  进入指定目录
exec /home/tom/.virtualenvs/py3_flask/bin/gunicorn --bind unix:/tmp/zixun.socket diversionSystem.wsgi:application
# 执行进程

咨询系统nginx


# /etc/nginx/sites-available/demo.zmrenwu.com

server {
    charset utf-8;
    listen 80;
    server_name demo.zmrenwu.com; 

    location /static { 
        alias /home/yangxg/sites/demo.zmrenwu.com/django-blog-tutorial/static; 
    }

    location / { 
        proxy_set_header Host $host;
        proxy_pass http://unix:/tmp/zixun.socket;
    }
}

相关文章

网友评论

      本文标题:gunicorn自启脚本

      本文链接:https://www.haomeiwen.com/subject/nbswectx.html