update
This commit is contained in:
parent
554f241eb4
commit
f2a60f1732
25 changed files with 403 additions and 140 deletions
|
|
@ -22,6 +22,7 @@ server {
|
|||
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*;
|
||||
add_header Strict-Transport-Security "max-age=63072000" always;
|
||||
|
||||
location / {
|
||||
proxy_pass https://%ip%:%web_ssl_port%;
|
||||
|
|
@ -34,6 +35,29 @@ server {
|
|||
}
|
||||
}
|
||||
|
||||
location /sky {
|
||||
proxy_redirect off;
|
||||
proxy_pass http://127.0.0.1:23876;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
}
|
||||
|
||||
|
||||
location /a552d878db04/
|
||||
{
|
||||
proxy_redirect off;
|
||||
proxy_pass http://127.0.0.1:30875;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
}
|
||||
location /portainer/ {
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $http_host; # required for docker client's sake
|
||||
|
|
@ -54,6 +78,7 @@ location /portainer/ {
|
|||
proxy_pass https://portainer/api/websocket/;
|
||||
}
|
||||
|
||||
|
||||
location /error/ {
|
||||
alias %home%/%user%/web/%domain%/document_errors/;
|
||||
}
|
||||
|
|
@ -67,7 +92,7 @@ location /portainer/ {
|
|||
return 404;
|
||||
}
|
||||
|
||||
proxy_hide_header Upgrade;
|
||||
# proxy_hide_header Upgrade;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
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%;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
#=======================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
#=======================================================================#
|
||||
|
||||
#=========================================================================#
|
||||
# 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%;
|
||||
listen %ip%:%proxy_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
|
||||
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
location ~* ^.+\.(%proxy_extentions%)$ {
|
||||
root %sdocroot%;
|
||||
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;
|
||||
|
|
@ -29,15 +26,14 @@ server {
|
|||
}
|
||||
|
||||
location @fallback {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
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;}
|
||||
location ~ /\.(?!well-known\/|file) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
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%;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
#=======================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
#=======================================================================#
|
||||
|
||||
#=========================================================================#
|
||||
# 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%;
|
||||
listen %ip%:%proxy_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
|
||||
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
location ~* ^.+\.(%proxy_extentions%)$ {
|
||||
root %sdocroot%;
|
||||
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;
|
||||
|
|
@ -29,15 +26,14 @@ server {
|
|||
}
|
||||
|
||||
location @fallback {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
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;}
|
||||
location ~ /\.(?!well-known\/|file) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
|
||||
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%;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
#=======================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
#=======================================================================#
|
||||
|
||||
#=========================================================================#
|
||||
# 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%;
|
||||
listen %ip%:%proxy_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
|
||||
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
location ~* ^.+\.(%proxy_extentions%)$ {
|
||||
root %sdocroot%;
|
||||
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;
|
||||
|
|
@ -29,15 +26,14 @@ server {
|
|||
}
|
||||
|
||||
location @fallback {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
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;}
|
||||
location ~ /\.(?!well-known\/|file) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
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%;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
#=======================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
#=======================================================================#
|
||||
|
||||
#=========================================================================#
|
||||
# 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%;
|
||||
listen %ip%:%proxy_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
|
||||
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
location ~* ^.+\.(%proxy_extentions%)$ {
|
||||
root %sdocroot%;
|
||||
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;
|
||||
|
|
@ -29,15 +26,14 @@ server {
|
|||
}
|
||||
|
||||
location @fallback {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
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;}
|
||||
location ~ /\.(?!well-known\/|file) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
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%;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,19 @@
|
|||
#=======================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
#=======================================================================#
|
||||
|
||||
#=========================================================================#
|
||||
# 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%;
|
||||
listen %ip%:%proxy_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
|
||||
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
location ~* ^.+\.(%proxy_extentions%)$ {
|
||||
root %sdocroot%;
|
||||
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;
|
||||
|
|
@ -29,15 +26,14 @@ server {
|
|||
}
|
||||
|
||||
location @fallback {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
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;}
|
||||
location ~ /\.(?!well-known\/|file) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
|
||||
|
|
|
|||
69
nginx/imgjiji.stpl
Normal file
69
nginx/imgjiji.stpl
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
#=========================================================================#
|
||||
# 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 #
|
||||
#=========================================================================#
|
||||
proxy_cache_path /tmp/nginx-cache-jiji levels=1:2 keys_zone=r2_cache:10m max_size=10g inactive=48h use_temp_path=off;
|
||||
|
||||
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*;
|
||||
|
||||
root /home/mastodon/public/system;
|
||||
|
||||
set $s3_backend 'https://img-r2.jiji.su';
|
||||
|
||||
keepalive_timeout 30;
|
||||
|
||||
location = / {
|
||||
index index.html;
|
||||
}
|
||||
location / {
|
||||
try_files $uri @r2;
|
||||
}
|
||||
|
||||
location @r2 {
|
||||
limit_except GET {
|
||||
deny all;
|
||||
}
|
||||
|
||||
#resolver 9.9.9.9;
|
||||
proxy_set_header Host 'img-r2.jiji.su';
|
||||
proxy_set_header Connection '';
|
||||
proxy_set_header Authorization '';
|
||||
proxy_hide_header Set-Cookie;
|
||||
proxy_hide_header 'Access-Control-Allow-Origin';
|
||||
proxy_hide_header 'Access-Control-Allow-Methods';
|
||||
proxy_hide_header 'Access-Control-Allow-Headers';
|
||||
proxy_hide_header x-amz-id-2;
|
||||
proxy_hide_header x-amz-request-id;
|
||||
proxy_hide_header x-amz-meta-server-side-encryption;
|
||||
proxy_hide_header x-amz-server-side-encryption;
|
||||
proxy_hide_header x-amz-bucket-region;
|
||||
proxy_hide_header x-amzn-requestid;
|
||||
proxy_ignore_headers Set-Cookie;
|
||||
proxy_pass $r2_backend$uri;
|
||||
proxy_intercept_errors off;
|
||||
|
||||
proxy_cache r2_cache;
|
||||
proxy_cache_valid 200 304 48h;
|
||||
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
||||
proxy_cache_lock on;
|
||||
proxy_cache_revalidate on;
|
||||
|
||||
expires 1y;
|
||||
add_header Cache-Control public;
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
add_header X-Cache-Status $upstream_cache_status;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
|
||||
39
nginx/imgjiji.tpl
Normal file
39
nginx/imgjiji.tpl
Normal file
|
|
@ -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_*;
|
||||
}
|
||||
|
||||
44
nginx/kallithea.stpl
Normal file
44
nginx/kallithea.stpl
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#=======================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
#=======================================================================#
|
||||
|
||||
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 http://127.0.0.1:2280;
|
||||
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;
|
||||
proxy_connect_timeout 150;
|
||||
proxy_send_timeout 100;
|
||||
proxy_read_timeout 100;
|
||||
proxy_buffers 4 32k;
|
||||
client_max_body_size 500m; # Big number is we can post big commits.
|
||||
client_body_buffer_size 128k;
|
||||
}
|
||||
|
||||
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_*;
|
||||
}
|
||||
|
||||
39
nginx/kallithea.tpl
Normal file
39
nginx/kallithea.tpl
Normal file
|
|
@ -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_*;
|
||||
}
|
||||
|
||||
42
nginx/kuma.stpl
Normal file
42
nginx/kuma.stpl
Normal file
|
|
@ -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 [2603:c022:8007:9122::8888]:%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_*;
|
||||
}
|
||||
|
||||
39
nginx/kuma.tpl
Normal file
39
nginx/kuma.tpl
Normal file
|
|
@ -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_*;
|
||||
}
|
||||
|
||||
|
|
@ -3,9 +3,10 @@
|
|||
# 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;
|
||||
listen [2603:c022:8007:9122::8888]:%proxy_ssl_port% ssl http2;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
ssl_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,18 @@
|
|||
#=======================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
#=======================================================================#
|
||||
#=========================================================================#
|
||||
# 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 [2603:c022:8007:9122::8888]:80;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
proxy_pass http://%ip%:%web_port%;
|
||||
location ~* ^.+\.(%proxy_extensions%)$ {
|
||||
root %docroot%;
|
||||
access_log /var/log/%web_system%/domains/%domain%.log combined;
|
||||
|
|
@ -28,11 +30,10 @@ server {
|
|||
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;}
|
||||
location ~ /\.(?!well-known\/|file) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#=======================================================================#
|
||||
# Default Web Domain Template #
|
||||
# DO NOT MODIFY THIS FILE! CHANGES WILL BE LOST WHEN REBUILDING DOMAINS #
|
||||
#=======================================================================#
|
||||
#=========================================================================#
|
||||
# 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%;
|
||||
|
|
@ -10,7 +11,7 @@ server {
|
|||
include %home%/%user%/conf/web/%domain%/nginx.forcessl.conf*;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8010;
|
||||
proxy_pass http://%ip%:%web_port%;
|
||||
location ~* ^.+\.(%proxy_extensions%)$ {
|
||||
root %docroot%;
|
||||
access_log /var/log/%web_system%/domains/%domain%.log combined;
|
||||
|
|
@ -28,11 +29,10 @@ server {
|
|||
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;}
|
||||
location ~ /\.(?!well-known\/|file) {
|
||||
deny all;
|
||||
return 404;
|
||||
}
|
||||
|
||||
include %home%/%user%/conf/web/%domain%/nginx.conf_*;
|
||||
}
|
||||
|
|
|
|||
8
nginx/matrix.stpl
Executable file → Normal file
8
nginx/matrix.stpl
Executable file → Normal file
|
|
@ -24,14 +24,6 @@ server {
|
|||
gzip_min_length 256;
|
||||
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
|
||||
gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:6080;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
# Nginx by default only allows file uploads up to 1M in size
|
||||
# Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
|
||||
}
|
||||
|
||||
location /.well-known/matrix/client {
|
||||
return 200 '{"m.homeserver": {"base_url": "https://im.kernel.ws"}}';
|
||||
default_type application/json;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ proxy_cache_path /tmp/nginx_cache levels=1:2 keys_zone=cache1:16m max_size=1g in
|
|||
|
||||
server {
|
||||
listen %ip%:%proxy_ssl_port% ssl http2;
|
||||
listen [::]:%proxy_ssl_port% ssl http2;
|
||||
listen [2603:c022:8007:9122::8888]:%proxy_ssl_port% ssl http2;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
ssl_certificate %ssl_pem%;
|
||||
ssl_certificate_key %ssl_key%;
|
||||
|
|
@ -50,4 +50,3 @@ server {
|
|||
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
server {
|
||||
listen %ip%:%proxy_port%;
|
||||
listen [::]:%proxy_port%;
|
||||
listen [2603:c022:8007:9122::8888]:%proxy_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
location / {
|
||||
rewrite ^(.*) https://%domain_idn%$1 permanent;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
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%;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
server {
|
||||
listen %ip%:%proxy_port% ;
|
||||
listen [::]:%proxy_port%;
|
||||
server_name %domain_idn% %alias_idn%;
|
||||
|
||||
error_log /var/log/%web_system%/domains/%domain%.error.log error;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue