uwsgi --ini /etc/uwsgi.ini
upstream wsbackend {
server 127.0.0.1:8000;
}
server {
listen 80;
server_name www.xxx.com;
root /website/AutocareBaoLei;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location /static/ {
alias /website/AutocareBaoLei/static/;
}
location /media/ {
alias /website/AutocareBaoLei/media/;
}
location / {
include uwsgi_params;
uwsgi_pass wsbackend;
}
location /webssh/ {
proxy_pass http://127.0.0.1:8080/webssh/;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}