66 lines
1.6 KiB
Nginx Configuration File
66 lines
1.6 KiB
Nginx Configuration File
server {
|
|
server_name drop.bakatrouble.pw;
|
|
|
|
location /_ {
|
|
alias /srv/apps/drop/files;
|
|
}
|
|
|
|
location / {
|
|
include uwsgi_params;
|
|
uwsgi_pass unix:///tmp/drop.sock;
|
|
}
|
|
|
|
listen 443 ssl; # managed by Certbot
|
|
ssl_certificate /etc/letsencrypt/live/bakatrouble.pw/fullchain.pem; # managed by Certbot
|
|
ssl_certificate_key /etc/letsencrypt/live/bakatrouble.pw/privkey.pem; # managed by Certbot
|
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
|
|
|
|
if ($scheme != "https") {
|
|
return 301 https://$host$request_uri;
|
|
} # managed by Certbot
|
|
|
|
|
|
|
|
}
|
|
|
|
server {
|
|
server_name ~^(?<dir>.*)\.drop\.bakatrouble\.pw$;
|
|
|
|
location /_ {
|
|
alias /srv/apps/drop/subdomain_files/$dir;
|
|
}
|
|
|
|
location / {
|
|
include uwsgi_params;
|
|
uwsgi_pass unix:///tmp/drop.sock;
|
|
}
|
|
|
|
listen 443 ssl; # managed by Certbot
|
|
ssl_certificate /etc/letsencrypt/live/bakatrouble.pw/fullchain.pem; # managed by Certbot
|
|
ssl_certificate_key /etc/letsencrypt/live/bakatrouble.pw/privkey.pem; # managed by Certbot
|
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
|
|
|
|
if ($scheme != "https") {
|
|
return 301 https://$host$request_uri;
|
|
} # managed by Certbot
|
|
|
|
}
|
|
server {
|
|
if ($host = drop.bakatrouble.pw) {
|
|
return 301 https://$host$request_uri;
|
|
} # managed by Certbot
|
|
|
|
if ($host ~ ^(?<dir>.*)\.drop\.bakatrouble\.pw$) {
|
|
return 301 https://$host$request_uri;
|
|
} # managed by Certbot
|
|
|
|
|
|
listen 80;
|
|
server_name drop.bakatrouble.pw ~^(?<dir>.*)\.drop\.bakatrouble\.pw$;
|
|
return 404; # managed by Certbot
|
|
|
|
|
|
}
|