From 3e4c47d001e3eabcbae80bfd16683eccb52c9894 Mon Sep 17 00:00:00 2001 From: qy117121 Date: Thu, 9 Feb 2023 15:11:52 +0800 Subject: [PATCH] update --- nginx/mastodon.tpl | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 nginx/mastodon.tpl diff --git a/nginx/mastodon.tpl b/nginx/mastodon.tpl new file mode 100644 index 0000000..3a7fba1 --- /dev/null +++ b/nginx/mastodon.tpl @@ -0,0 +1,39 @@ +#=======================================================================# +# Default Web Domain Template # +# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS # +#=======================================================================# + +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + + include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*; + + location / { + proxy_pass http://127.0.0.1:8010; + location ~* ^.+\.(%proxy_extensions%)$ { + root %docroot%; + 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 { + proxy_pass http://%ip%:%web_port%; + } + + 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.conf_*; +} +