From f5045b61f649028724165bc5ee3d7cb627c386be Mon Sep 17 00:00:00 2001 From: qy117121 Date: Wed, 29 Mar 2023 10:33:06 +0800 Subject: [PATCH] update --- nginx/app-shlink.stpl | 35 ++++++++++++++++++++++++++++++++ nginx/app-shlink.tpl | 39 ++++++++++++++++++++++++++++++++++++ nginx/arm.stpl | 0 nginx/arm.tpl | 0 nginx/cloudreve.stpl | 0 nginx/cloudreve.tpl | 0 nginx/default.stpl | 46 +++++++++++++++++++++++++++++++++++++++++++ nginx/default.tpl | 39 ++++++++++++++++++++++++++++++++++++ nginx/dns.stpl | 0 nginx/filerun.stpl | 0 nginx/filerun.tpl | 0 nginx/gitbucket.stpl | 0 nginx/gitbucket.tpl | 0 nginx/gitea.stpl | 0 nginx/gitea.tpl | 0 nginx/gitlab.stpl | 0 nginx/gitlab.tpl | 0 nginx/imgjiji.stpl | 0 nginx/imgjiji.tpl | 0 nginx/kallithea.stpl | 0 nginx/kallithea.tpl | 0 nginx/kuma.stpl | 42 +++++++++++++++++++++++++++++++++++++++ nginx/kuma.tpl | 40 +++++++++++++++++++++++++++++++++++++ nginx/mail.stpl | 0 nginx/mail.tpl | 0 nginx/mastodon.stpl | 0 nginx/mastodon.tpl | 0 nginx/matrix.stpl | 0 nginx/matrix.tpl | 0 nginx/mirrors.stpl | 0 nginx/mirrors.tpl | 0 nginx/misskey.stpl | 9 +++++++-- nginx/misskey.tpl | 0 nginx/portainer.stpl | 0 nginx/portainer.tpl | 0 nginx/s3.stpl | 4 ++-- nginx/s3.tpl | 0 nginx/shlink.stpl | 35 ++++++++++++++++++++++++++++++++ nginx/shlink.tpl | 39 ++++++++++++++++++++++++++++++++++++ nginx/tz.stpl | 0 nginx/tz.tpl | 0 nginx/ws.stpl | 0 nginx/ws.tpl | 0 nginx/xray.stpl | 0 nginx/xray.tpl | 0 45 files changed, 324 insertions(+), 4 deletions(-) create mode 100755 nginx/app-shlink.stpl create mode 100755 nginx/app-shlink.tpl mode change 100644 => 100755 nginx/arm.stpl mode change 100644 => 100755 nginx/arm.tpl mode change 100644 => 100755 nginx/cloudreve.stpl mode change 100644 => 100755 nginx/cloudreve.tpl create mode 100755 nginx/default.stpl create mode 100755 nginx/default.tpl mode change 100644 => 100755 nginx/dns.stpl mode change 100644 => 100755 nginx/filerun.stpl mode change 100644 => 100755 nginx/filerun.tpl mode change 100644 => 100755 nginx/gitbucket.stpl mode change 100644 => 100755 nginx/gitbucket.tpl mode change 100644 => 100755 nginx/gitea.stpl mode change 100644 => 100755 nginx/gitea.tpl mode change 100644 => 100755 nginx/gitlab.stpl mode change 100644 => 100755 nginx/gitlab.tpl mode change 100644 => 100755 nginx/imgjiji.stpl mode change 100644 => 100755 nginx/imgjiji.tpl mode change 100644 => 100755 nginx/kallithea.stpl mode change 100644 => 100755 nginx/kallithea.tpl create mode 100755 nginx/kuma.stpl create mode 100755 nginx/kuma.tpl mode change 100644 => 100755 nginx/mail.stpl mode change 100644 => 100755 nginx/mail.tpl mode change 100644 => 100755 nginx/mastodon.stpl mode change 100644 => 100755 nginx/mastodon.tpl mode change 100644 => 100755 nginx/matrix.stpl mode change 100644 => 100755 nginx/matrix.tpl mode change 100644 => 100755 nginx/mirrors.stpl mode change 100644 => 100755 nginx/mirrors.tpl mode change 100644 => 100755 nginx/misskey.stpl mode change 100644 => 100755 nginx/misskey.tpl mode change 100644 => 100755 nginx/portainer.stpl mode change 100644 => 100755 nginx/portainer.tpl mode change 100644 => 100755 nginx/s3.stpl mode change 100644 => 100755 nginx/s3.tpl create mode 100755 nginx/shlink.stpl create mode 100755 nginx/shlink.tpl mode change 100644 => 100755 nginx/tz.stpl mode change 100644 => 100755 nginx/tz.tpl mode change 100644 => 100755 nginx/ws.stpl mode change 100644 => 100755 nginx/ws.tpl mode change 100644 => 100755 nginx/xray.stpl mode change 100644 => 100755 nginx/xray.tpl diff --git a/nginx/app-shlink.stpl b/nginx/app-shlink.stpl new file mode 100755 index 0000000..c490d5c --- /dev/null +++ b/nginx/app-shlink.stpl @@ -0,0 +1,35 @@ +#=========================================================================# +# 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 # +#=========================================================================# + +server { + listen %ip%:%proxy_ssl_port% ssl http2; + server_name %domain_idn% %alias_idn%; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + ssl_stapling on; + ssl_stapling_verify on; + error_log /var/log/%web_system%/domains/%domain%.error.log error; + + include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*; + + location / { + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_redirect off; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_connect_timeout 300; + proxy_send_timeout 300; + proxy_read_timeout 300; + send_timeout 300; + proxy_pass http://127.0.0.1:9081; + } + + include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*; +} + diff --git a/nginx/app-shlink.tpl b/nginx/app-shlink.tpl new file mode 100755 index 0000000..497746c --- /dev/null +++ b/nginx/app-shlink.tpl @@ -0,0 +1,39 @@ +#=========================================================================# +# 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 # +#=========================================================================# + +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + + include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*; + + location / { + proxy_pass http://%ip%:%web_port%; + 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 ~ /\.(?!well-known\/|file) { + deny all; + return 404; + } + + include %home%/%user%/conf/web/%domain%/nginx.conf_*; +} + diff --git a/nginx/arm.stpl b/nginx/arm.stpl old mode 100644 new mode 100755 diff --git a/nginx/arm.tpl b/nginx/arm.tpl old mode 100644 new mode 100755 diff --git a/nginx/cloudreve.stpl b/nginx/cloudreve.stpl old mode 100644 new mode 100755 diff --git a/nginx/cloudreve.tpl b/nginx/cloudreve.tpl old mode 100644 new mode 100755 diff --git a/nginx/default.stpl b/nginx/default.stpl new file mode 100755 index 0000000..1014ace --- /dev/null +++ b/nginx/default.stpl @@ -0,0 +1,46 @@ +#=========================================================================# +# 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 # +#=========================================================================# + +server { + listen %ip%:%proxy_ssl_port% ssl http2; + server_name %domain_idn% %alias_idn%; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + ssl_stapling on; + ssl_stapling_verify on; + error_log /var/log/%web_system%/domains/%domain%.error.log error; + + include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*; + + location / { + proxy_pass https://%ip%:%web_ssl_port%; + location ~* ^.+\.(%proxy_extensions%)$ { + root %sdocroot%; + 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 https://%ip%:%web_ssl_port%; + } + + location ~ /\.(?!well-known\/|file) { + deny all; + return 404; + } + + proxy_hide_header Upgrade; + + include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*; +} + diff --git a/nginx/default.tpl b/nginx/default.tpl new file mode 100755 index 0000000..497746c --- /dev/null +++ b/nginx/default.tpl @@ -0,0 +1,39 @@ +#=========================================================================# +# 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 # +#=========================================================================# + +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + + include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*; + + location / { + proxy_pass http://%ip%:%web_port%; + 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 ~ /\.(?!well-known\/|file) { + deny all; + return 404; + } + + include %home%/%user%/conf/web/%domain%/nginx.conf_*; +} + diff --git a/nginx/dns.stpl b/nginx/dns.stpl old mode 100644 new mode 100755 diff --git a/nginx/filerun.stpl b/nginx/filerun.stpl old mode 100644 new mode 100755 diff --git a/nginx/filerun.tpl b/nginx/filerun.tpl old mode 100644 new mode 100755 diff --git a/nginx/gitbucket.stpl b/nginx/gitbucket.stpl old mode 100644 new mode 100755 diff --git a/nginx/gitbucket.tpl b/nginx/gitbucket.tpl old mode 100644 new mode 100755 diff --git a/nginx/gitea.stpl b/nginx/gitea.stpl old mode 100644 new mode 100755 diff --git a/nginx/gitea.tpl b/nginx/gitea.tpl old mode 100644 new mode 100755 diff --git a/nginx/gitlab.stpl b/nginx/gitlab.stpl old mode 100644 new mode 100755 diff --git a/nginx/gitlab.tpl b/nginx/gitlab.tpl old mode 100644 new mode 100755 diff --git a/nginx/imgjiji.stpl b/nginx/imgjiji.stpl old mode 100644 new mode 100755 diff --git a/nginx/imgjiji.tpl b/nginx/imgjiji.tpl old mode 100644 new mode 100755 diff --git a/nginx/kallithea.stpl b/nginx/kallithea.stpl old mode 100644 new mode 100755 diff --git a/nginx/kallithea.tpl b/nginx/kallithea.tpl old mode 100644 new mode 100755 diff --git a/nginx/kuma.stpl b/nginx/kuma.stpl new file mode 100755 index 0000000..c379999 --- /dev/null +++ b/nginx/kuma.stpl @@ -0,0 +1,42 @@ +#=======================================================================# +# Default Web Domain Template # +# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS # +#=======================================================================# + + +server { + listen %ip%:%proxy_ssl_port% ssl http2; + listen [::]:%proxy_ssl_port% ssl http2; + server_name %domain_idn% %alias_idn%; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + ssl_stapling on; + ssl_stapling_verify on; + error_log /var/log/%web_system%/domains/%domain%.error.log error; + + include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*; + + location / { + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $host; + proxy_pass http://127.0.0.1:3001/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + } + + 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_*; +} + diff --git a/nginx/kuma.tpl b/nginx/kuma.tpl new file mode 100755 index 0000000..9b1b904 --- /dev/null +++ b/nginx/kuma.tpl @@ -0,0 +1,40 @@ +#=========================================================================# +# 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 # +#=========================================================================# + +server { + listen %ip%:%proxy_port%; + listen [::]:%proxy_port%; + server_name %domain_idn% %alias_idn%; + + include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*; + + location / { + proxy_pass http://%ip%:%web_port%; + 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 ~ /\.(?!well-known\/|file) { + deny all; + return 404; + } + + include %home%/%user%/conf/web/%domain%/nginx.conf_*; +} + diff --git a/nginx/mail.stpl b/nginx/mail.stpl old mode 100644 new mode 100755 diff --git a/nginx/mail.tpl b/nginx/mail.tpl old mode 100644 new mode 100755 diff --git a/nginx/mastodon.stpl b/nginx/mastodon.stpl old mode 100644 new mode 100755 diff --git a/nginx/mastodon.tpl b/nginx/mastodon.tpl old mode 100644 new mode 100755 diff --git a/nginx/matrix.stpl b/nginx/matrix.stpl old mode 100644 new mode 100755 diff --git a/nginx/matrix.tpl b/nginx/matrix.tpl old mode 100644 new mode 100755 diff --git a/nginx/mirrors.stpl b/nginx/mirrors.stpl old mode 100644 new mode 100755 diff --git a/nginx/mirrors.tpl b/nginx/mirrors.tpl old mode 100644 new mode 100755 diff --git a/nginx/misskey.stpl b/nginx/misskey.stpl old mode 100644 new mode 100755 index fd60f13..e3dba59 --- a/nginx/misskey.stpl +++ b/nginx/misskey.stpl @@ -20,7 +20,7 @@ server { include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*; # Change to your upload limit - client_max_body_size 80m; + client_max_body_size 120m; # Proxy to Node location / { @@ -38,7 +38,12 @@ server { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; - add_header X-Cache $upstream_cache_status; + # 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_*; diff --git a/nginx/misskey.tpl b/nginx/misskey.tpl old mode 100644 new mode 100755 diff --git a/nginx/portainer.stpl b/nginx/portainer.stpl old mode 100644 new mode 100755 diff --git a/nginx/portainer.tpl b/nginx/portainer.tpl old mode 100644 new mode 100755 diff --git a/nginx/s3.stpl b/nginx/s3.stpl old mode 100644 new mode 100755 index 6e67977..152ba2d --- a/nginx/s3.stpl +++ b/nginx/s3.stpl @@ -20,7 +20,7 @@ server { root /home/mastodon/public/system; - set $s3_backend 'https://bucket-name.s3.nl-ams.scw.cloud'; + set $s3_backend 'https://184img.s3.nl-ams.scw.cloud'; keepalive_timeout 30; @@ -37,7 +37,7 @@ server { } #resolver 9.9.9.9; - proxy_set_header Host 'bucket-name.s3.nl-ams.scw.cloud'; + proxy_set_header Host '184img.s3.nl-ams.scw.cloud'; proxy_set_header Connection ''; proxy_set_header Authorization ''; proxy_hide_header Set-Cookie; diff --git a/nginx/s3.tpl b/nginx/s3.tpl old mode 100644 new mode 100755 diff --git a/nginx/shlink.stpl b/nginx/shlink.stpl new file mode 100755 index 0000000..9b8829b --- /dev/null +++ b/nginx/shlink.stpl @@ -0,0 +1,35 @@ +#=========================================================================# +# 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 # +#=========================================================================# + +server { + listen %ip%:%proxy_ssl_port% ssl http2; + server_name %domain_idn% %alias_idn%; + ssl_certificate %ssl_pem%; + ssl_certificate_key %ssl_key%; + ssl_stapling on; + ssl_stapling_verify on; + error_log /var/log/%web_system%/domains/%domain%.error.log error; + + include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*; + + location / { + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_redirect off; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_connect_timeout 300; + proxy_send_timeout 300; + proxy_read_timeout 300; + send_timeout 300; + proxy_pass http://127.0.0.1:8080; + } + + include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*; +} + diff --git a/nginx/shlink.tpl b/nginx/shlink.tpl new file mode 100755 index 0000000..497746c --- /dev/null +++ b/nginx/shlink.tpl @@ -0,0 +1,39 @@ +#=========================================================================# +# 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 # +#=========================================================================# + +server { + listen %ip%:%proxy_port%; + server_name %domain_idn% %alias_idn%; + + include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*; + + location / { + proxy_pass http://%ip%:%web_port%; + 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 ~ /\.(?!well-known\/|file) { + deny all; + return 404; + } + + include %home%/%user%/conf/web/%domain%/nginx.conf_*; +} + diff --git a/nginx/tz.stpl b/nginx/tz.stpl old mode 100644 new mode 100755 diff --git a/nginx/tz.tpl b/nginx/tz.tpl old mode 100644 new mode 100755 diff --git a/nginx/ws.stpl b/nginx/ws.stpl old mode 100644 new mode 100755 diff --git a/nginx/ws.tpl b/nginx/ws.tpl old mode 100644 new mode 100755 diff --git a/nginx/xray.stpl b/nginx/xray.stpl old mode 100644 new mode 100755 diff --git a/nginx/xray.tpl b/nginx/xray.tpl old mode 100644 new mode 100755