Advertisement
JLindvig

nginx/homeassistant

Oct 30th, 2019
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.10 KB | None | 0 0
  1. server {
  2.         listen 443 ssl http2;
  3.  
  4.         root /config/www;
  5.         index index.html index.htm index.php;
  6.  
  7.         server_name ha.DIT_DOMIAN.duckdns.org;
  8.  
  9.         client_max_body_size 0;
  10.  
  11.         ssl_certificate /etc/letsencrypt/live/ha.DIT_DOMIAN.duckdns.org/fullchain.pem;
  12.         ssl_certificate_key /etc/letsencrypt/live/ha.DIT_DOMIAN.duckdns.org/privkey.pem;
  13.         ssl_protocols TLSv1.1 TLSv1.2;
  14.         ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
  15.         add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
  16.         ssl_prefer_server_ciphers on;
  17.  
  18.         location / {
  19.                 proxy_pass http://homeassistant/;
  20.                 proxy_http_version 1.1;
  21.                 proxy_set_header Connection "";
  22.         }
  23.  
  24.     location /api/websocket {
  25.             proxy_pass http://homeassistant/api/websocket;
  26.             proxy_set_header Host $host;
  27.  
  28.             proxy_http_version 1.1;
  29.             proxy_set_header Upgrade $http_upgrade;
  30.             proxy_set_header Connection "upgrade";
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement