Everything working.
The homeassistant-le-ssl.conf file finally looks like this.
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName home-aaaaa.aaa.com
ProxyPreserveHostOn
Proxy Requests Off
ProxyPass /api/websocket ws://192.168.1.100:8123/api/websocket
ProxyPassReverse /api/websocket wss://192.168.1.100:8123/api/websocket
ProxyPass / http://192.168.1.100:8123/
ProxyPassReverse / http://192.168.1.100:8123/
RewriteEngine on
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule ^/?(.*) ws://192.168.1.100:8123/$1 [P,L]
<Location "/">
satisfy any
</Location>
<Location "/api">
satisfy any
</Location>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/home-aaaaa.aaa.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/home-aaaaa.aaa.com/privkey.pem
</VirtualHost>
</IfModule>
And also inside homeassistant in the configuration.yaml file (in my case) I added the following:
http:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.1.1
- 192.168.1.0/24