<VirtualHost *:80>
    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]
RewriteCond %{SERVER_NAME} =ha.nuage.ooo
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
