uwsgi
django项目目录下创建uwsgi.ini
[uwsgi]
socket = 127.0.0.1:8001
master = true
processes = 5
chdir=/home/bug/PycharmProjects/JEW/
env = DJANGO_SETTINGS_MODULE=JEW.settings
module = JEW.wsgi:application
virtualenv = /home/bug/PycharmProjects/JEW/ENV
enable-threads= True
thunder-lock= True
nginx
编辑/etc/nginx/sites-available/default
为如下内容
server {
listen 80 default_server;
listen [::]:80 default_server;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
include uwsgi_params;
uwsgi_pass 127.0.0.1:8001;
}
location /site_media {
alias /home/bug/PycharmProjects/JEW/JEW/site_media/static/;
}
}