一、Nginx配置
worker_processes 1;
events {
worker_connections 1024;
}
http{
include mime.types;
default_type application/octet-stream;
upstream django{
server 127.0.0.1:8080;
}
server {
listen 80;
server_name 192.168.85.128;
charset utf-8;
client_max_body_size 75M;
location /media {
alias /www/mysite/www.xiaofei.tech/fzy/media;
}
location /static {
alias /www/mysite/www.xiaofei.tech/fzy/static;
}
location / {
uwsgi_pass django;
include uwsgi_params;
# uwsgi_param UWSGI_CHDIR /www/mysite/www.xiaofei.tech/fzy/;
}
}
}
二、uwsgi
[uwsgi]
env DJANGO_SETTINGS_MODULE=fzy.settings
chdir=/www/mysite/www.xiaofei.tech/fzy
socket=127.0.0.1:8080
#http=192.168.85.128:8000
chmod-socket = 666
uid=root
gid=root
module=fzy.wsgi:application
#socket=/www/mysite/www.xiaofei.tech/fzy/uwsgi/uwsgi.sock
master=true
workers=5
processes=10
pidfile=/www/mysite/www.xiaofei.tech/fzy/uwsgi/uwsgi.pid
vacuum=true
thunder-lock=true
enable-threads=true
harakiri=30
post-buffering=4096
daemonize=/www/mysite/www.xiaofei.tech/fzy/uwsgi/uwsgi.log
#static-map = /static
buffer-size=65535