46 lines
931 B
Plaintext
46 lines
931 B
Plaintext
error_log /var/log/mnml/nginx.log debug;
|
|
|
|
upstream mnml_http {
|
|
server 127.0.0.1:40000;
|
|
}
|
|
|
|
upstream mnml_ws {
|
|
server 127.0.0.1:40055;
|
|
}
|
|
|
|
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
# DEV
|
|
server {
|
|
location / {
|
|
root /var/lib/mnml/public/current;
|
|
index index.html;
|
|
try_files $uri $uri/ index.html;
|
|
|
|
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
|
|
expires off;
|
|
}
|
|
|
|
location /imgs/ {
|
|
root /var/lib/mnml/public/;
|
|
try_files $uri $uri/ =404;
|
|
}
|
|
|
|
location /api/ws {
|
|
proxy_pass http://mnml_ws;
|
|
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_http;
|
|
proxy_read_timeout 600s;
|
|
}
|
|
}
|