NGINX - HTTP integration setup issue

Hi All, really hope someone can help here…

I am running latest HASSio (OS 6.1) with Core 21.7.3 on a NUC

I have just added the “NGINX Home Assistant SSL proxy” Add-on and have the following options set in the add-on:

domain: mydomain.co.uk
certfile: fullchain.pem
keyfile: privkey.pem
hsts: max-age=31536000; includeSubDomains
cloudflare: false
customize:
  active: false
  default: nginx_proxy_default*.conf
  servers: nginx_proxy/*.conf

Were my domain is of course set to my actual domain. I have also modified my configuration.yaml as follows:

http:
##  ssl_certificate: /ssl/fullchain.pem
##  ssl_key: /ssl/privkey.pem
##  ip_ban_enabled: true
##  login_attempts_threshold: 4
use_x_forwarded_for: true
trusted_proxies:
  - 172.30.33.4
  - 127.0.0.1
  - ::1

I was initially note sure what IP’s to add here but as the reverse proxy is on the actual NUC then I have read quite a few posts recently the I need to add 172.0.0.1 & ::1 - I have no idea as to why exactly but not sure its relevant to my issue at this stage. I was also not sure what the actual NGINX IP address was but then I found the following error:

A request from a reverse proxy was received from 172.30.33.4, but your HTTP integration is not set-up for reverse proxies

So I assume I have set all the required settings correctly, however I am unable to proceed as following the configuration.yaml edit (as show above) I now get the following error:

Configuration invalid
Component error: trusted_proxies - Integration 'trusted_proxies' not found. Component error: use_x_forwarded_for - Integration 'use_x_forwarded_for' not found.

I am really not sure how to proceed from here, I am pretty sure its me being an idiot (again) but any input would be much appreciated at this point.

Thanks all

Your indentation is wrong.

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24

You don’t need to specify any other addresses. See the last example in this section: HTTP - Home Assistant

2 Likes

For crying out loud why on earth did I not spot that at any point, thanks Rob I knew it was me being an idiot :man_shrugging: