add proxy feature to nginx
This commit is contained in:
parent
3523edbcb4
commit
85b3adf671
3 changed files with 24 additions and 4 deletions
|
@ -17,12 +17,27 @@ server {
|
||||||
ssl_stapling_verify on;
|
ssl_stapling_verify on;
|
||||||
|
|
||||||
add_header Strict-Transport-Security "max-age=31104000; preload";
|
add_header Strict-Transport-Security "max-age=31104000; preload";
|
||||||
|
add_header Referrer-Policy same-origin;
|
||||||
add_header X-Frame-Options "DENY";
|
add_header X-Frame-Options "DENY";
|
||||||
|
add_header X-Content-Type-Options nosniff;
|
||||||
|
|
||||||
location /.well-known/acme-challenge/ {
|
location /.well-known/acme-challenge/ {
|
||||||
alias /var/lib/dehydrated/acme-challenges/;
|
alias /var/lib/dehydrated/acme-challenges/;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
% if proxy:
|
||||||
|
% for location, proxy_pass in proxy.items():
|
||||||
|
location ${location} {
|
||||||
|
proxy_pass ${proxy_pass};
|
||||||
|
proxy_set_header X-Script-Name /;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto HTTPS;
|
||||||
|
proxy_set_header X-Forwarded-Host ${domain};
|
||||||
|
proxy_buffering off;
|
||||||
|
}
|
||||||
|
% endfor
|
||||||
|
% endif
|
||||||
|
|
||||||
% if extras:
|
% if extras:
|
||||||
<%include file="extras/${node.name}/${domain}" />
|
<%include file="extras/${node.name}/${domain}" />
|
||||||
% endif
|
% endif
|
||||||
|
|
|
@ -2,7 +2,3 @@
|
||||||
alias /etc/matrix-synapse/wellknown/;
|
alias /etc/matrix-synapse/wellknown/;
|
||||||
add_header Access-Control-Allow-Origin *;
|
add_header Access-Control-Allow-Origin *;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /.well-known/acme-challenge/ {
|
|
||||||
alias /var/run/acme/acme-challenge/;
|
|
||||||
}
|
|
||||||
|
|
|
@ -62,6 +62,15 @@ nodes['htz.ex42-1048908'] = {
|
||||||
'@.*:franzi\\\\.business',
|
'@.*:franzi\\\\.business',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
'nginx': {
|
||||||
|
'vhosts': {
|
||||||
|
'jenkins.kunsmann.eu': {
|
||||||
|
'proxy': {
|
||||||
|
'/': 'http://localhost:9000/',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
'riot-web': {
|
'riot-web': {
|
||||||
'url': 'chat.franzi.business',
|
'url': 'chat.franzi.business',
|
||||||
'config': {
|
'config': {
|
||||||
|
|
Loading…
Reference in a new issue