Advertisement
Guest User

Untitled

a guest
Oct 16th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.82 KB | None | 0 0
  1. map $http_upgrade $connection_upgrade {
  2.     default upgrade;
  3.     ''      close;
  4. }
  5.  
  6. server {
  7.     # Update this line to be your domain
  8.     server_name gw.knob.it;
  9.  
  10.     # These shouldn't need to be changed
  11.     listen 80 http2; # if your nginx version is >= 1.9.5 you can also add the "http2" flag here
  12.     add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
  13.     access_log /var/log/nginx/hass.access.log;
  14.     error_log /var/log/nginx/hass.error.log;
  15.  
  16.     proxy_buffering off;
  17.  
  18.     location /ha/ {
  19.         proxy_pass http://127.0.0.1:8123;
  20.         proxy_set_header Host $host;
  21.         proxy_http_version 1.1;
  22.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  23.         proxy_set_header Upgrade $http_upgrade;
  24.         proxy_set_header Connection $connection_upgrade;
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement