DocumentRoot /var/www/html AliasMatch "^/api(/.*)?" "/var/www/html/public$1" Options FollowSymLinks AllowOverride All Require all granted AliasMatch "^(/.*)?" "/var/www/html/frontend/dist$1" AllowOverride All Order allow,deny Allow from All RewriteEngine on RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^ index.html [L] ErrorLog "${APACHE_LOG_DIR}/error.log" CustomLog "${APACHE_LOG_DIR}/access.log" combined