upstream django { // 配置好被转发到哪个端口
# server unix:///home/abc/uwsgi-tutorial/mysite/mysite.sock; # for a file socket
server 0.0.0.0:3032; # for a web port socket (we'll use this first)
}
server {
# the port your site will be served on
listen 8002; // nginx负责监听的端口
# the domain name it will serve for
server_name localhost; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 75M; # adjust to taste
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass django; // 转发的路由
include /root/sxx_system/uwsgi_params;
}
}