Hier meine Confs:
Die apache2.conf habe ich folgende 2 Confs eingebunden.
Include /var/www/project1/vhost.conf
Include /var/www/project2/vhost.conf
Project 1
Alias /project1 "/var/www/project1"
<Directory /var/www/project1>
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
Project 2
Alias /project2 "/var/www/project2"
<Directory /var/www/project2>
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
Jedes der Projects hat ein .htaccess
Project1
<IfModule mod_rewrite.c>
#Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /project1/index.php/?$1 [L]
</IfModule>
Project2
<IfModule mod_rewrite.c>
#Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /project2/index.php/?$1 [L]
</IfModule>
Die Projects liegen eigentlich nicht in /var/www, sondern sind ein Symlink direkt auf den Publicfolder.
lrwxrwxrwx 1 www-data www-data 21 Apr 9 08:20 phpmyadmin -> /usr/share/phpmyadmin
lrwxrwxrwx 1 root root 53 Apr 9 16:29 project1 -> /home/mav/Development/project1/public
lrwxrwxrwx 1 www-data www-data 21 Apr 9 08:21 phpsysinfo -> /usr/share/phpsysinfo
lrwxrwxrwx 1 root root 55 Apr 9 16:29 project2 -> /home/mav/Development/project2/public