update to django 3.0 & asgi
This commit is contained in:
59
nginx.conf
59
nginx.conf
@@ -1,20 +1,51 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name bots.bakatrouble.pw;
|
||||
server_name ~^bots\.bakatrouble\.(pw|me)$;
|
||||
|
||||
access_log /srv/apps/bots/logs/nginx.access;
|
||||
error_log /srv/apps/bots/logs/nginx.error;
|
||||
access_log /srv/apps/bots/logs/nginx.access;
|
||||
error_log /srv/apps/bots/logs/nginx.error;
|
||||
|
||||
location /static {
|
||||
alias /srv/apps/bots/public/static;
|
||||
}
|
||||
location /static {
|
||||
alias /srv/apps/bots/public/static;
|
||||
}
|
||||
|
||||
location /uploads {
|
||||
alias /srv/apps/bots/public/uploads;
|
||||
}
|
||||
location /uploads {
|
||||
alias /srv/apps/bots/public/uploads;
|
||||
}
|
||||
|
||||
location / {
|
||||
include uwsgi_params;
|
||||
uwsgi_pass unix:///tmp/bots.sock;
|
||||
}
|
||||
location / {
|
||||
proxy_pass unix:///tmp/bots.sock;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
}
|
||||
|
||||
listen [::]:443 http2 ssl ipv6only=on;
|
||||
listen 443 http2 ssl;
|
||||
ssl_certificate /etc/letsencrypt/live/bakatrouble.pw/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/bakatrouble.pw/privkey.pem;
|
||||
# include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
|
||||
|
||||
|
||||
if ($scheme != "https") {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host ~ ^bots\.bakatrouble\.(pw|me)$) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
listen [::]:80 ipv6only=on;
|
||||
listen 80;
|
||||
server_name ~^bots\.bakatrouble\.(pw|me)$;
|
||||
return 404;
|
||||
}
|
||||
|
Reference in New Issue
Block a user