nginx: Fix incorrect display of YAML config example in documentation (#2119)

This commit is contained in:
Franck Nijhof
2021-07-21 23:17:21 +02:00
committed by GitHub
parent 65e221267d
commit d2769651ce

View File

@@ -14,16 +14,18 @@ The NGINX Proxy add-on is commonly used in conjunction with the [Duck DNS](https
1. The certificate to your registered domain should already be created via the [Duck DNS](https://github.com/home-assistant/hassio-addons/tree/master/duckdns) add-on or another method. Make sure that the certificate files exist in the `/ssl` directory. 1. The certificate to your registered domain should already be created via the [Duck DNS](https://github.com/home-assistant/hassio-addons/tree/master/duckdns) add-on or another method. Make sure that the certificate files exist in the `/ssl` directory.
2. In the `configuration.yaml` file, some options in the `http:` section are no longer necessary for this scenario, and should be commented out or removed: 2. In the `configuration.yaml` file, some options in the `http:` section are no longer necessary for this scenario, and should be commented out or removed:
- `ssl_certificate` - `ssl_certificate`
- `ssl_key` - `ssl_key`
- `server_port` - `server_port`
3. And you need to add the `trusted_proxies` section (requests from reverse proxies will be blocked if these options are not set). 3. And you need to add the `trusted_proxies` section (requests from reverse proxies will be blocked if these options are not set).
```yaml
http: ```yaml
use_x_forwarded_for: true http:
trusted_proxies: use_x_forwarded_for: true
- 172.30.33.0/24 trusted_proxies:
``` - 172.30.33.0/24
```
4. In the nginx addon configuration, change the `domain` option to the domain name you registered (from DuckDNS or any other domain you control). 4. In the nginx addon configuration, change the `domain` option to the domain name you registered (from DuckDNS or any other domain you control).
5. Leave all other options as-is. 5. Leave all other options as-is.
6. Save configuration. 6. Save configuration.