hestiacp/nginx/maddy.stpl

46 lines
1.3 KiB
Text
Raw Normal View History

2022-05-11 09:20:52 +08:00
#=======================================================================#
# Default Web Domain Template #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
#=======================================================================#
2023-02-16 19:52:41 +08:00
2022-05-11 09:20:52 +08:00
server {
2024-04-30 12:58:13 +08:00
listen %ip%:%proxy_ssl_port% ssl;
server_name %domain_idn% %alias_idn%;
error_log /var/log/%web_system%/domains/%domain%.error.log error;
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; }
2022-05-11 09:20:52 +08:00
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
location / {
2025-03-26 16:19:16 +08:00
proxy_pass http://127.0.0.1:8090;
2022-05-11 09:20:52 +08:00
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
}
location /error/ {
alias %home%/%user%/web/%domain%/document_errors/;
}
location ~ /\.ht {return 404;}
location ~ /\.svn/ {return 404;}
location ~ /\.git/ {return 404;}
location ~ /\.hg/ {return 404;}
location ~ /\.bzr/ {return 404;}
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
}