您好,登录后才能下订单哦!
这篇文章给大家介绍gunicorn +nginx+python3 部署flask项目依赖的包是怎样的,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。
gunicorn +nginx+python3 部署(gevent+gevent)--依赖的包
bind = ["0.0.0.0:5010"]
workers = 4
backlog = 2048
worker_class = 'gevent'
forwarded_allow_ips = "*"
keepalive = 5
timeout = 300
worker_connections = 65535
loglevel = "info"
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'
accesslog = '/root/tv/tv_api/zhijian_tv_api/gunicorn_access.log'
errorlog = '/root/tv/tv_api/zhijian_tv_api/gunicorn_error.log'
运行命令----gunicorn -c gunicorn_conf.py manager:app -D
=================================================================
nginx.conf ----不动
=================================================================
nginx/conf.d
server {
listen 80;
server_name max-tv.net.cn, www.max-tv.net.cn;
return 301 https://www.max-tv.net.cn$request_uri;
}
server {
listen 443 ssl;
server_name www.max-tv.net.cn;
ssl_certificate /etc/nginx/ssl_h6/2425677_max-tv.net.cn.pem;
ssl_certificate_key /etc/nginx/ssl_h6/2425677_max-tv.net.cn.key;
root /usr/share/nginx/html;
location / {
root /root/newProject/h6newproject/dist;
index index.html index.htm list.html MP_verify_zseh73X5od2vmgWX.txt;
try_files $uri $uri/ /index.html;
}
location /api/share/ {
error_page 404 /404.html;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://sharing;
error_page 500 502 503 504 /50x.html;}
}
upstream sharing {
server 39.98.188.73:5011 fail_timeout=0;
}
关于gunicorn +nginx+python3 部署flask项目依赖的包是怎样的就分享到这里了,希望以上内容可以对大家有一定的帮助,可以学到更多知识。如果觉得文章不错,可以把它分享出去让更多的人看到。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。