I'm looking to offer my users beta access to test new features. I'm running my site using the Symfony framework.
Currently I have the following working configuration:
mysite.com:
<VirtualHost *:80>
DocumentRoot /var/www/html/mysite/current/web
ServerName mysite.com
ServerAlias www.mysite.com
<Directory "/var/www/html/mysite/current/web">
AllowOverride None
Order Allow,Deny
Allow from All
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
</Directory>
</VirtualHost>
I attempted to serve a beta version of my site with the following config:
<VirtualHost *:80>
DocumentRoot /var/www/html/mysite_beta/current/web
ServerName beta.mysite.com
<Directory /var/www/html/mysite_beta/current/web>
AllowOverride None
Require all granted
Allow from All
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
</Directory>
</VirtualHost>
This did not work and Apache served only the content from the second configuration but with 404 errors for the resources like css and js files that are included.
I'm not familiar enough with configuring Apache to get this working as I intend.
How can I get 2 different codebases of my site running on the same Apache server?