From dc534fab0cf812bdb892cb9c55f648f79ce32c2e Mon Sep 17 00:00:00 2001 From: root Date: Fri, 27 Jan 2023 09:17:01 +0000 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20'nginx'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx/dns.stpl | 40 ++++++++++------------------------------ 1 file changed, 10 insertions(+), 30 deletions(-) mode change 100755 => 100644 nginx/dns.stpl diff --git a/nginx/dns.stpl b/nginx/dns.stpl old mode 100755 new mode 100644 index d760e3f..f8687eb --- a/nginx/dns.stpl +++ b/nginx/dns.stpl @@ -3,13 +3,6 @@ # 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 # #=========================================================================# -upstream portainer { - server 127.0.1.1:9090; -} -map $http_upgrade $connection_upgrade { - default upgrade; - '' close; -} server { listen %ip%:%proxy_ssl_port% ssl http2; @@ -23,29 +16,16 @@ server { include %home%/%user%/conf/web/%domain%/nginx.hsts.conf*; location / { - proxy_pass http://127.0.0.1:8989; + proxy_pass http://127.0.1.1:8989; + 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 /portainer/ { - proxy_http_version 1.1; - proxy_set_header Host $http_host; # required for docker client's sake - proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_read_timeout 900; - - proxy_set_header Connection ""; - proxy_buffers 32 4k; - proxy_pass https://portainer/; - } - - location /portainer/api/websocket/ { - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection $connection_upgrade; - proxy_pass https://portainer/api/websocket/; - } - location /pma121/ { proxy_http_version 1.1; proxy_set_header Host $http_host; # required for docker client's sake @@ -56,7 +36,7 @@ server { proxy_set_header Connection ""; proxy_buffers 32 4k; - proxy_pass http://127.0.0.1:8988/; + proxy_pass http://127.0.1.1:8988/; } location /error/ { @@ -64,7 +44,7 @@ server { } location @fallback { - proxy_pass http://127.0.0.1:8989; + proxy_pass http://127.0.1.1:8989; } location ~ /\.(?!well-known\/|file) {