85 lines
2.0 KiB
Plaintext
85 lines
2.0 KiB
Plaintext
|
|
upstream eversolo_app {
|
||
|
|
server app:3000;
|
||
|
|
keepalive 32;
|
||
|
|
}
|
||
|
|
|
||
|
|
map $http_upgrade $connection_upgrade {
|
||
|
|
default upgrade;
|
||
|
|
'' close;
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
listen [::]:80;
|
||
|
|
server_name www.luxsin.net luxsin.net;
|
||
|
|
|
||
|
|
location / {
|
||
|
|
return 301 https://www.luxsin.net$request_uri;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 443 ssl;
|
||
|
|
listen [::]:443 ssl;
|
||
|
|
http2 on;
|
||
|
|
server_name www.luxsin.net;
|
||
|
|
|
||
|
|
ssl_certificate /etc/nginx/certs/fullchain.pem;
|
||
|
|
ssl_certificate_key /etc/nginx/certs/privkey.pem;
|
||
|
|
ssl_session_timeout 1d;
|
||
|
|
ssl_session_cache shared:SSL:10m;
|
||
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||
|
|
ssl_prefer_server_ciphers off;
|
||
|
|
|
||
|
|
add_header X-Content-Type-Options nosniff always;
|
||
|
|
add_header X-Frame-Options SAMEORIGIN always;
|
||
|
|
add_header Referrer-Policy strict-origin-when-cross-origin always;
|
||
|
|
|
||
|
|
# Payload uploads served directly from the persistent data volume (see docker-compose nginx mounts).
|
||
|
|
location /media/ {
|
||
|
|
alias /srv/uploads/media/;
|
||
|
|
access_log off;
|
||
|
|
expires 30d;
|
||
|
|
add_header Cache-Control "public, max-age=2592000, immutable";
|
||
|
|
}
|
||
|
|
|
||
|
|
location /files/ {
|
||
|
|
alias /srv/uploads/files/;
|
||
|
|
access_log off;
|
||
|
|
expires 7d;
|
||
|
|
add_header Cache-Control "public, max-age=604800";
|
||
|
|
}
|
||
|
|
|
||
|
|
location /videos/ {
|
||
|
|
alias /srv/uploads/videos/;
|
||
|
|
access_log off;
|
||
|
|
expires 30d;
|
||
|
|
add_header Cache-Control "public, max-age=2592000";
|
||
|
|
}
|
||
|
|
|
||
|
|
location / {
|
||
|
|
proxy_pass http://eversolo_app;
|
||
|
|
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;
|
||
|
|
proxy_set_header Upgrade $http_upgrade;
|
||
|
|
proxy_set_header Connection $connection_upgrade;
|
||
|
|
proxy_read_timeout 300s;
|
||
|
|
proxy_send_timeout 300s;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 443 ssl;
|
||
|
|
listen [::]:443 ssl;
|
||
|
|
http2 on;
|
||
|
|
server_name luxsin.net;
|
||
|
|
|
||
|
|
ssl_certificate /etc/nginx/certs/fullchain.pem;
|
||
|
|
ssl_certificate_key /etc/nginx/certs/privkey.pem;
|
||
|
|
|
||
|
|
return 301 https://www.luxsin.net$request_uri;
|
||
|
|
}
|