I have following configuration file on my Debian machine:
<VirtualHost *:80>
ServerAdmin [email protected]
VirtualDocumentRoot /var/workspace/www/%2_%3/%1
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/workspace/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Which is great for automation - i just create a directory in specific path and domain just start working.
But sometimes I need to launch apps, which has docroots somewhere else (typicaly www dir or something else), how do I specify this VirtualHosts and keep working the old automatic VirtualHosts?
When I add e.g. this:
<VirtualHost *:80>
ServerName www.phabricator.com.local
DocumentRoot /var/workspace/www/phabricator_com/www/webroot
RewriteEngine on
RewriteRule ^/rsrc/(.*) - [L,QSA]
RewriteRule ^/favicon.ico - [L,QSA]
RewriteRule ^(.*)$ /index.php?__path__=$1 [L,QSA]
SetEnv PHABRICATOR_ENV custom/socialbakers
</VirtualHost>
It routes all requests on /var/workspace/www/phabricator_com/www/webroot
and ignores the other vhosts (mentioned above).
Why?