# dash.logicahn.com — Dashboard Vue (SPA)
# Copiar a: /etc/apache2/sites-available/logicahn-dash.conf
# sudo a2ensite logicahn-dash.conf && sudo systemctl reload apache2

<VirtualHost *:80>
    ServerName dash.logicahn.com
    DocumentRoot /var/www/dash/logica/dashboard/dist

    <Directory /var/www/dash/logica/dashboard/dist>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted

        # Vue Router — history mode
        RewriteEngine On
        RewriteBase /
        RewriteRule ^index\.html$ - [L]
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.html [L]
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/logicahn-dash-error.log
    CustomLog ${APACHE_LOG_DIR}/logicahn-dash-access.log combined
</VirtualHost>
