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