fling/container/etc/nginx/conf.d/fling.conf
Armin Friedl e59d8bba6a
All checks were successful
continuous-integration/drone/push Build is passing
Deploy build artifacts to nexus
2020-06-12 20:38:30 +02:00

43 lines
1.2 KiB
Text

server {
listen 3000;
listen [::]:3000;
server_name _;
root /var/www/fling;
# config to enable HSTS(HTTP Strict Transport Security)
add_header Strict-Transport-Security "max-age=15552000; includeSubdomains;";
# forward /api requests to tomcat
location /api {
proxy_pass http://localhost:8080;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
# Required for web sockets to function
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Allow huge file uploads
client_max_body_size 5G;
}
# always respond with index.html for unknown paths
# (routing is client side)
location / {
try_files $uri /index.html;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}