I am trying to configure Apache for different symfony projects (each with its own framework installation) in the same domain, but I cannot get it to work with folders.
This is what I would like to have:
- mydomain.com/projectone/
- mydomain.com/projecttwo/
I can get it to work using subdomains, but for me this is not the preferred solution because I have crazy subdomains:
- projectone.mydomain.com
- backend.projectone.mydomain.com
- projecttwo.mydomain.com
- backend.projecttwo.mydomain.com
I use this configuration in Apache to work with subdomains:
<VirtualHost 127.0.0.1:8080> ServerName projectone.mydomain.com DocumentRoot "/home/projectone/web" DirectoryIndex frontend.php <Directory "/home/projectone/web"> Options -Indexes IncludesNOEXEC FollowSymLinks -MultiViews AllowOverride None Allow from All RewriteEngine On # we check if the .html version is here (caching) RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f # no, so we redirect to our front web controller RewriteRule ^(.*)$ frontend.php [QSA,L] </Directory> Alias /sf /home/projectone/lib/vendor/symfony/data/web/sf <Directory "/home/projectone/lib/vendor/symfony/data/web/sf"> AllowOverride All Allow from All </Directory> </VirtualHost>
Any idea on how to get the folders resolved?
Thanks in advance, Eneko
apache symfony1 virtualhost
eillarra
source share