update
This commit is contained in:
parent
7d341187f5
commit
bcd14299e5
11 changed files with 411 additions and 74 deletions
74
nginx/arm.stpl
Normal file
74
nginx/arm.stpl
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
#=========================================================================#
|
||||
# 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 #
|
||||
#=========================================================================#
|
||||
|
||||
upstream portainer {
|
||||
server 127.0.1.1:9090;
|
||||
}
|
||||
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
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 /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 /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_*;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue