Laravel 11 + Apache Alias /A Returns 404 for All Routes on Virtualmin

SYSTEM INFORMATION
OS type and version Debian 12
Webmin version 2.520
Virtualmin version 7.50.0 GPL
Apache Webserver version 2.4.65
Laravel 11

I have multiple Laravel 11 apps on a Virtualmin VPS with Apache:

  • sso-login → main app (root)
  • A → secondary app, supposed to be accessible via /A

The main app works fine. But when accessing app A via https://ip.address/A/..., all routes return 404 Not Found.

My Apache Configuration:

<VirtualHost *:80>
    ServerName ip.address
    DocumentRoot /home/smmp/public_html/sso-login/public

    <Directory /home/smmp/public_html/sso-login/public>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    Alias /A /home/smmp/public_html/A/public
    <Directory /home/smmp/public_html/A/public>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

.htaccess in A/public:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /A

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

Issue:

  • Accessing https://ip.address/A/auth/callback or /A/dashboard → 404
  • Adding prefix A in routes → URLs become /A/A/... (not ideal)
  • File permissions: smmp:www-data, 664/775 for files/folders, storage & bootstrap/cache 775
  • mod_rewrite enabled and AllowOverride All set

Question

  1. How to properly configure Laravel 11 + Apache Alias so that:
  • app A is accessible via /A
  • Laravel routes remain without /A prefix
  • All routes work normally
  1. Could I be missing any DocumentRoot, Alias, .htaccess, or index.php configuration that causes 404 errors for all routes in app A?