symfony - WAMP Apache VirtualHost and Symfony2 issue -


i'm working wamp on windows 7. every time try create virtual host work "clean" urls symfony2 project, 404 errors.

here's httpd.conf:

namevirtualhost localhost  <virtualhost localhost>          documentroot "d:/documents/wamp/"     servername localhost     </virtualhost>  <virtualhost my-project.local>     servername my-project.local     documentroot "d:/documents/wamp/my-project/web/"     directoryindex app.php     <directory "d:/documents/wamp/my-project/web/">         allowoverride         allow     </directory> </virtualhost> 

my hosts file:

127.0.0.1       my-project.local 

when try reach http://my-project.local, symfony 404 error. when check http://my-project.local/app.dev, i'm redirected http://my-project.local 404 error , finally, when try reach http://my-project.local/app_dev.php, correct page loaded absolutely no css.

i tried replace directoryindex app.php directoryindex app_dev.php still 404.

i don't have issue when create virtual hosts other projects powered laravel example.

example virtualhost 1)

read further info: https://breinjhel.wordpress.com/2012/10/30/configuring-your-apache-web-server-vhost-for-symfony2-website/

<virtualhost *:80>     servername yourproject.com     documentroot "c:/xampp/htdocs/yourproject/web"     directoryindex app_dev.php     <directory "c:/xampp/htdocs/yourproject/web">         options indexes followsymlinks multiviews         allowoverride none         order allow,deny         allow         <ifmodule mod_rewrite.c>             rewriteengine on             rewritecond %{request_filename} !-f             rewriterule ^(.*)$ /app_dev.php [qsa,l]         </ifmodule>     </directory> </virtualhost> 

example virtualhost 2)

read further info: symfony 2 on virtual hosts

<virtualhost *:80>     servername www.domain.com.localhost     serveralias domain.com.localhost     serveradmin webmaster@localhost      documentroot /home/user/www/project/web     <directory /home/user/www/project/web/>         options indexes followsymlinks multiviews         allowoverride none         order allow,deny         allow         <ifmodule mod_rewrite.c>             rewriteengine on             rewritecond %{request_filename} !-f             rewriterule ^(.*)$ /app.php [qsa,l]         </ifmodule>     </directory> </virtualhost> 

Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -