# VHost généré par deploy/node/cli.mjs install-front-apache-vhost
<VirtualHost *:80>
    ServerName release-vn-stackpos.pluma-preprod.com
    DocumentRoot /var/www/html/stackpos/releases/vN/ttm-shop-front/dist
    <Directory /var/www/html/stackpos/releases/vN/ttm-shop-front/dist>
        Options FollowSymLinks
        AllowOverride None
        Require all granted
        DirectoryIndex index.html
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^ - [L]
        RewriteRule ^ /index.html [L]
    </Directory>
    ProxyPreserveHost On
    RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}

    ProxyPass        /socket.io/  ws://stackpos-node:3100/socket.io/
    ProxyPassReverse /socket.io/  ws://stackpos-node:3100/socket.io/

    ProxyPass        /api         http://stackpos-node:3100/api
    ProxyPassReverse /api         http://stackpos-node:3100/api

    Alias /uploads /var/www/html/stackpos/shared-public/uploads
    <Directory /var/www/html/stackpos/shared-public/uploads>
        Options FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>

    Alias /apk /var/www/html/stackpos/shared-public/apk
    <Directory /var/www/html/stackpos/shared-public/apk>
        Options FollowSymLinks
        AllowOverride None
        Require all granted
    </Directory>
</VirtualHost>