56 lines
1.8 KiB
Text
Executable file
56 lines
1.8 KiB
Text
Executable file
#=======================================================================#
|
|
# Default Web Domain Template #
|
|
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
|
#=======================================================================#
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
server {
|
|
listen %ip%:%proxy_ssl_port% ssl;
|
|
listen [::]:%proxy_ssl_port% ssl;
|
|
server_name %domain_idn% %alias_idn%;
|
|
ssl_certificate %ssl_pem%;
|
|
ssl_certificate_key %ssl_key%;
|
|
ssl_stapling on;
|
|
ssl_stapling_verify on;
|
|
|
|
# TLS 1.3 0-RTT anti-replay
|
|
if ($anti_replay = 307) { return 307 https://$host$request_uri; }
|
|
if ($anti_replay = 425) { return 425; }
|
|
|
|
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
|
|
|
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
|
|
|
# Change to your upload limit
|
|
client_max_body_size 120m;
|
|
|
|
# Proxy to Node
|
|
location / {
|
|
proxy_pass http://127.0.0.1:3003;
|
|
proxy_set_header Host $host;
|
|
proxy_http_version 1.1;
|
|
proxy_redirect off;
|
|
|
|
# If it's behind another reverse proxy or CDN, remove the following.
|
|
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 https;
|
|
|
|
# For WebSocket
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
|
|
# Cache settings
|
|
# proxy_cache cache1;
|
|
# proxy_cache_lock on;
|
|
# proxy_cache_use_stale updating;
|
|
# proxy_force_ranges on;
|
|
# add_header X-Cache $upstream_cache_status;
|
|
}
|
|
|
|
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
|
}
|
|
|