| 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/callbackor/A/dashboard→ 404 - Adding prefix
Ain routes → URLs become/A/A/...(not ideal) - File permissions:
smmp:www-data, 664/775 for files/folders, storage & bootstrap/cache 775 mod_rewriteenabled andAllowOverride Allset
Question
- How to properly configure Laravel 11 + Apache Alias so that:
- app A is accessible via
/A - Laravel routes remain without
/Aprefix - All routes work normally
- Could I be missing any DocumentRoot, Alias, .htaccess, or index.php configuration that causes 404 errors for all routes in app A?