<IfModule mod_ssl.c>
<VirtualHost *:443>
    ServerName ha.nuage.ooo

    ProxyPreserveHost On
    ProxyPass / http://localhost:8123/
    ProxyPassReverse / http://localhost:8123/

    # Cette partie permet de garder la connexion active (Websockets)
    RewriteEngine on
    RewriteCond %{HTTP:Upgrade} =websocket [NC]
    RewriteRule /(.*)  ws://localhost:8123/$1 [P,L]
    RewriteCond %{HTTP:Upgrade} !=websocket [NC]
    RewriteRule /(.*)  http://localhost:8123/$1 [P,L]

SSLCertificateFile /etc/letsencrypt/live/ha.nuage.ooo/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/ha.nuage.ooo/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
