django部署

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详细部署

你可能感兴趣的:(django部署)