繁体   English   中英

如何使用 gunicorn 和 nginx 在 cwp Cent Os 7 上部署 Django 应用程序

[英]How to deploy Django apps on cwp Cent Os 7 using gunicorn and nginx

我已经尝试过很多次这个艺术 https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-centos-7但我不是得到结果。

我使用带有 CentOs 7 和 CWP 的专用服务器,但我无法通过 nginx 服务器连接我的 wsi.py 文件

我在 centos7 cwp 上进行第一次部署,所以请随时建议我更新鲜。

假设您无法配置 nginx 来传递您的应用程序的流量。 您需要通过添加以下内容来更新 cwp 中 /etc/nginx/conf.d/vhosts/ 中的域的虚拟主机:

location /static/ {
root /home/domain_account/public_html/;
expires 1d;
}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM