43 lines
1.2 KiB
Nginx Configuration File
43 lines
1.2 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
|
|
server_name _;
|
|
access_log /dev/stdout;
|
|
error_log /dev/stdout info;
|
|
client_max_body_size 8M;
|
|
|
|
location /api/ {
|
|
proxy_pass http://mapmaker:8000/api/;
|
|
proxy_http_version 1.1;
|
|
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-Proto $scheme;
|
|
}
|
|
|
|
location /ws/ {
|
|
proxy_pass http://mapmaker:8000/ws/;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
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-Proto $scheme;
|
|
proxy_read_timeout 86400s;
|
|
proxy_send_timeout 86400s;
|
|
proxy_connect_timeout 60s;
|
|
}
|
|
|
|
location / {
|
|
root /var/www/html/public;
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
# Cache static assets
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
}
|
|
}
|