hestiacp/nginx/matrix.tpl

40 lines
1.2 KiB
Smarty
Raw Normal View History

2024-04-30 12:58:13 +08:00
#=========================================================================#
# Default Web Domain Template #
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
# https://docs.hestiacp.com/admin_docs/web.html#how-do-web-templates-work #
#=========================================================================#
2022-05-11 09:20:52 +08:00
server {
2024-04-30 12:58:13 +08:00
listen %ip%:%proxy_port%;
2022-05-11 09:20:52 +08:00
server_name %domain_idn% %alias_idn%;
2024-04-30 12:58:13 +08:00
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
2022-05-11 09:20:52 +08:00
location / {
2024-04-30 12:58:13 +08:00
proxy_pass http://%ip%:%web_port%;
location ~* ^.+\.(%proxy_extensions%)$ {
root %docroot%;
2022-05-11 09:20:52 +08:00
access_log /var/log/%web_system%/domains/%domain%.log combined;
access_log /var/log/%web_system%/domains/%domain%.bytes bytes;
expires max;
try_files $uri @fallback;
}
}
location /error/ {
alias %home%/%user%/web/%domain%/document_errors/;
}
location @fallback {
2024-04-30 12:58:13 +08:00
proxy_pass http://%ip%:%web_port%;
2022-05-11 09:20:52 +08:00
}
2024-04-30 12:58:13 +08:00
location ~ /\.(?!well-known\/|file) {
deny all;
return 404;
}
2022-05-11 09:20:52 +08:00
2024-04-30 12:58:13 +08:00
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
2022-05-11 09:20:52 +08:00
}