
<VirtualHost *:80>
    ServerName sio.sentech.tech

    DocumentRoot /var/www/clients/client0/web1/web/sio.sentech.tech/
    
    <Directory /var/www/clients/client0/web1/web/sio.sentech.tech>
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

<VirtualHost *:443>
    ServerName sio.sentech.tech

    DocumentRoot /var/www/clients/client0/web1/web/sio.sentech.tech/

    <Directory /var/www/clients/client0/web1/web/sio.sentech.tech>
        AllowOverride All
        Require all granted
    </Directory>
    <IfModule mod_ssl.c>
		SSLEngine on
        SSLCertificateFile /var/www/clients/client0/web1/ssl/sentech.tech-le.crt
		SSLCertificateKeyFile /var/www/clients/client0/web1/ssl/sentech.tech-le.key
    </IfModule>
    
    SSLProxyEngine on
    SSLProxyVerify none
    SSLProxyCheckPeerCN off
    SSLProxyCheckPeerName off
    SSLProxyCheckPeerExpire off

    ProxyPass / https://localhost:3000/
    ProxyPassReverse / https://localhost:3000/

    RewriteEngine On
    RewriteCond %{HTTP:Upgrade} websocket [NC]
    RewriteCond %{HTTP:Connection} upgrade [NC]
    RewriteRule ^/?(.*) "wss://localhost:3000/$1" [P,L]

    ErrorLog /var/www/clients/client0/web1/log/sio.sentech.tech.log
</VirtualHost>

