欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

django部署

程序员文章站 2022-06-11 11:34:53
...

nginx.conf文件


server {
    listen    80;
    server_name 39.107.77.223 localhost;

    access_log /home/logs/access.log;
    error_log /home/logs/error.log;

    location / {
        include uwsgi_params;
        uwsgi_pass 127.0.0.1:8890;
    }

    location /static/ {
        alias /home/src/fresh_shop/static;
    }

    location /media/ {
        alias /home/media/;
    }
}

uwsgi.ini文件


master = True

processes = 4

chdir = /home/src/fresh_shop

pythonpath = /home/env/ttsxenv/bin/python3

module = fresh_shop.wsgi

socket = 127.0.0.1:8890

logto = /home/logs/ttsxuwsgi.log

django详细部署