This commit is contained in:
seb
2026-09-23 10:18:31 +02:00
parent c21a951884
commit 0391e845f0
3 changed files with 42 additions and 8 deletions

View File

@@ -13,7 +13,7 @@ map $http_upgrade $connection_upgrade {
server {
listen 80;
listen [::]:80;
server_name dash.example.com; # <-- Replace with your domain or server IP
server_name dashdev.quixpos.com;
location ^~ /.well-known/acme-challenge/ {
root /var/www/certbot;
@@ -32,11 +32,11 @@ server {
listen [::]:443 ssl;
http2 on;
server_name dash.example.com; # <-- Replace with your domain or server IP
server_name dashdev.quixpos.com;
# --- SSL / TLS Certificates ---
ssl_certificate /etc/letsencrypt/live/dash.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/dash.example.com/privkey.pem;
ssl_certificate /etc/letsencrypt/live/dashdev.quixpos.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/dashdev.quixpos.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
@@ -45,6 +45,9 @@ server {
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
# --- Header Buffer Limits (prevents HTTP/2 RST_STREAM / ERR_HTTP2_PROTOCOL_ERROR) ---
large_client_header_buffers 4 128k;
# --- Static File Root ---
root /home/seb/src/dashfront/dist;
index index.html;
@@ -87,16 +90,21 @@ server {
proxy_pass http://127.0.0.1:4208;
proxy_http_version 1.1;
proxy_set_header Connection "";
# Clear Connection & Accept-Encoding to prevent upstream gzip/chunk buffering
proxy_set_header Connection "";
proxy_set_header Accept-Encoding "";
proxy_set_header Host $http_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;
# Disable buffering and compression completely for immediate push
proxy_buffering off;
proxy_cache off;
chunked_transfer_encoding off;
gzip off;
# Prevent premature disconnections; keep SSE open for 24 hours
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
@@ -106,6 +114,8 @@ server {
proxy_pass http://127.0.0.1:4208;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;