50 lines
1.1 KiB
Plaintext
50 lines
1.1 KiB
Plaintext
upstream mnml_dev {
|
|
server 0.0.0.0:41337;
|
|
}
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
# DEV
|
|
server {
|
|
root /home/git/mnml/client/dist/;
|
|
index index.html;
|
|
|
|
server_name dev.mnml.gg; # managed by Certbot
|
|
|
|
location / {
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
listen [::]:443;
|
|
ssl on;
|
|
listen 443 ssl; # managed by Certbot
|
|
ssl_certificate /etc/letsencrypt/live/dev.mnml.gg/fullchain.pem; # managed by Certbot
|
|
ssl_certificate_key /etc/letsencrypt/live/dev.mnml.gg/privkey.pem; # managed by Certbot
|
|
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
|
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
|
|
|
|
location /api/ws {
|
|
proxy_pass http://mnml_dev;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
proxy_read_timeout 600s;
|
|
}
|
|
|
|
location /api/ {
|
|
proxy_pass http://mnml_dev;
|
|
proxy_read_timeout 600s;
|
|
}
|
|
|
|
}
|
|
|
|
# http -> https
|
|
server {
|
|
server_name dev.mnml.gg;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|