1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00

Move map block out of server block

This commit is contained in:
Mike Lloyd 2022-09-06 16:12:20 -07:00
parent 45df6e77ff
commit 0fe3c21223

View File

@ -24,6 +24,12 @@ tls_key_path: ""
The following example configuration can be used in your nginx setup, substituting values as necessary. `<IP:PORT>` should be the IP address and port where headscale is running. In most cases, this will be `http://localhost:8080`. The following example configuration can be used in your nginx setup, substituting values as necessary. `<IP:PORT>` should be the IP address and port where headscale is running. In most cases, this will be `http://localhost:8080`.
```Nginx ```Nginx
map $http_upgrade $connection_upgrade {
default keep-alive;
'websocket' upgrade;
'' close;
}
server { server {
listen 80; listen 80;
listen [::]:80; listen [::]:80;
@ -37,12 +43,6 @@ server {
ssl_certificate_key <PATH_CERT_KEY>; ssl_certificate_key <PATH_CERT_KEY>;
ssl_protocols TLSv1.2 TLSv1.3; ssl_protocols TLSv1.2 TLSv1.3;
map $http_upgrade $connection_upgrade {
default keep-alive;
'websocket' upgrade;
'' close;
}
location / { location / {
proxy_pass http://<IP:PORT>; proxy_pass http://<IP:PORT>;
proxy_http_version 1.1; proxy_http_version 1.1;