Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name hass.example.com;
- location / {
- proxy_pass http://127.0.0.1:8123;
- #proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forwarded-Proto $scheme;
- # the next 3 lines are for cocket protocol nedded both for web ui and mobile app
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
- location /api/websocket {
- proxy_pass http://127.0.0.1:8123/api/websocket;
- proxy_set_header Host $host;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment