简体   繁体   中英

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

I have tried many times this artical https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-centos-7 but I am not getting the result.

I using dedicated server with CentOs 7 and CWP but I am not able to connect my wsi.py file through nginx server

I am doing first time deployment on centos7 cwp,So feel free to suggest me as fresher.

Assuming you could not configure nginx to pass your app's traffic. You need to update your domain's vhost in /etc/nginx/conf.d/vhosts/ in cwp by adding this:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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