mirror of
https://github.com/KevinMidboe/nginx.git
synced 2025-12-08 04:18:52 +00:00
Cleanup : all sites share a common syntax
This commit is contained in:
31
sites-available/headscale.conf
Normal file
31
sites-available/headscale.conf
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
# TODO
|
||||
# - Move SSL termination here and remove from headscale.schleppe
|
||||
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default keep-alive;
|
||||
'websocket' upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
|
||||
server_name flow.schleppe.cloud;
|
||||
|
||||
location / {
|
||||
resolver 10.0.0.72;
|
||||
proxy_pass http://headscale.schleppe:8080;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Host $server_name;
|
||||
proxy_redirect http:// https://;
|
||||
proxy_buffering off;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
|
||||
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user