mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-29 18:33:05 +00:00
Move map block out of server block
This commit is contained in:
parent
45df6e77ff
commit
0fe3c21223
1 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue