69 lines
2.1 KiB
Plaintext
69 lines
2.1 KiB
Plaintext
# biztaghavi.com — NODE Cloud origin (ArvanCloud CDN in front)
|
|
# Public SSL: ArvanCloud dashboard → SSL mode "Full", origin 193.105.234.35
|
|
# Origin SSL: shared self-signed cert (required so nginx does not serve Gitea on :443)
|
|
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_proxied any;
|
|
gzip_comp_level 6;
|
|
gzip_types text/plain text/css text/xml application/json application/javascript
|
|
application/xml+rss application/atom+xml image/svg+xml;
|
|
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name biztaghavi.com www.biztaghavi.com;
|
|
|
|
ssl_certificate /etc/ssl/certs/nodecloud-selfsigned.crt;
|
|
ssl_certificate_key /etc/ssl/private/nodecloud-selfsigned.key;
|
|
|
|
client_max_body_size 50M;
|
|
|
|
# Next.js static assets — long-lived cache
|
|
location /_next/static/ {
|
|
proxy_pass http://127.0.0.1:3009;
|
|
proxy_set_header Host $host;
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
access_log off;
|
|
}
|
|
|
|
# Uploaded media
|
|
location /uploads/ {
|
|
proxy_pass http://127.0.0.1:3009;
|
|
proxy_set_header Host $host;
|
|
add_header Cache-Control "public, max-age=86400";
|
|
access_log off;
|
|
}
|
|
|
|
# Next.js HMR / WebSocket (dev only; harmless in prod)
|
|
location /_next/webpack-hmr {
|
|
proxy_pass http://127.0.0.1:3009;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
proxy_set_header Host $host;
|
|
}
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:3009;
|
|
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 "upgrade";
|
|
|
|
proxy_read_timeout 60s;
|
|
proxy_send_timeout 60s;
|
|
proxy_connect_timeout 10s;
|
|
|
|
proxy_buffering off;
|
|
proxy_cache_bypass $http_upgrade;
|
|
}
|
|
}
|