I'm developing with Symfony and I ran into an issue. My issue I want my files from this path: D:/media/sandbox/sf-boardgame/web/app_dev.php/ To be accessed by this: sf.boardgame sandbox is my DocumentRoot. sf-boardgame is the name of my project What did I do? I have added in my hosts file: 127.0.0.1 sf.boardgame In my vhosts file (httpd-vhosts.conf) I added: <VirtualHost *:80> DocumentRoot "D:/media/sandbox" ServerName sf.boardgame </VirtualHost> <VirtualHost *:8080> ServerName sf.boardgame DocumentRoot "D:/media/sandbox/sf-boardgame/web" DirectoryIndex app_dev.php <Directory "D:/media/sandbox/sf-boardgame/web> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /app_dev.php [QSA,L] </IfModule> </Directory> </VirtualHost>
I guess I was trying something out and forgot to remove the first one. I now have this code: <VirtualHost *:8080> ServerName sf.boardgame DocumentRoot "D:/media/sandbox/sf-boardgame/web" DirectoryIndex app_dev.php <Directory "D:/media/sandbox/sf-boardgame/web> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /app_dev.php [QSA,L] </IfModule> </Directory> </VirtualHost> Hmm still not working, what could it be?