Redirect to HTTPS at the edge

This commit is contained in:
Jake Howard 2021-08-23 16:10:37 +01:00
parent a54d373526
commit 93cba46dd1
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 5 additions and 10 deletions

View file

@ -23,6 +23,11 @@ http {
#gzip on; #gzip on;
server {
listen 80;
server_name _;
return 308 https://$host$request_uri;
}
} }
stream { stream {
@ -38,11 +43,6 @@ stream {
access_log /var/log/nginx/access.log access; access_log /var/log/nginx/access.log access;
access_log /var/log/nginx/ips.log ips; access_log /var/log/nginx/ips.log ips;
server {
listen 80;
proxy_pass {{ wireguard.clients.ingress.ip }}:880;
proxy_protocol on;
}
server { server {
listen 443; listen 443;
proxy_pass {{ wireguard.clients.ingress.ip }}:8443; proxy_pass {{ wireguard.clients.ingress.ip }}:8443;

View file

@ -31,11 +31,6 @@ listen matrix_internal
server default {{ pve_hosts.pve_docker.ip }}:443 send-proxy-v2 server default {{ pve_hosts.pve_docker.ip }}:443 send-proxy-v2
# External routes # External routes
listen http_external
bind *:880 accept-proxy
mode http
server default {{ pve_hosts.pve_docker.ip }}:80 send-proxy-v2
listen https_external listen https_external
bind *:8443 accept-proxy bind *:8443 accept-proxy
mode tcp mode tcp