From 1b266b18a42d1e715c1c19a157caa16e0bb5728d Mon Sep 17 00:00:00 2001 From: Florian Klien Date: Tue, 6 Mar 2018 21:18:48 +0100 Subject: [PATCH] nginx rev proxy minimal version 1.3.13 (#4849) * nginx rev proxy minimal version 1.3.13 * Some other minor changes --- source/_docs/ecosystem/nginx.markdown | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/_docs/ecosystem/nginx.markdown b/source/_docs/ecosystem/nginx.markdown index 24e4c7e0849..46ae6152d1c 100644 --- a/source/_docs/ecosystem/nginx.markdown +++ b/source/_docs/ecosystem/nginx.markdown @@ -14,13 +14,17 @@ Using NGINX as a proxy for Home Assistant allows you to serve Home Assistant sec ### {% linkable_title 1. Get a domain name forwarded to your IP %} -Chances are, you have a dynamic IP Address (your ISP changes your address periodically). If this is true, you can use a Dynamic DNS service to obtain a domain and set it up to update with you IP. If you purchase your own domain name, you will be able to easily get a trusted SSL certificate later. +Chances are, you have a dynamic IP address (your ISP changes your address periodically). If this is true, you can use a Dynamic DNS service to obtain a domain and set it up to update with you IP. If you purchase your own domain name, you will be able to easily get a trusted SSL certificate later. ### {% linkable_title 2 Install nginx on your server %} This will vary depending on your OS. Check out Google for this. After installing, ensure that NGINX is not running. +

+You will at least need nginx >= 1.3.13, as WebSocket support is required for the reverse proxy. +

+ ### {% linkable_title 3. Obtain an SSL certificate %} There are two ways of obtaining an SSL certificate. @@ -28,7 +32,7 @@ There are two ways of obtaining an SSL certificate. #### {% linkable_title Using Let's Encrypt %} If you purchased your own domain, you can use https://letsencrypt.org/ to obtain a free, publicly trusted SSL certificate. This will allow you to work with services like IFTTT. Download and install per the instructions online and get a certificate using the following command. -``` +```bash $ sudo ./letsencrypt-auto certonly --standalone -d example.com -d www.example.com ``` @@ -75,14 +79,13 @@ $ sudo ln ../sites-available/hass default Double check this configuration to ensure all settings are correct and start nginx. - ### {% linkable_title 8. Port forwarding. %} Forward ports 443 and 80 to your server on your router. Do not forward port 8123. ### {% linkable_title NGINX Config %} -``` +```text map $http_upgrade $connection_upgrade { default upgrade; '' close;