about httpd.conf
I'm starting to learn symfony for php framework and I got problem with httpd.conf configuration.
First, I have xampplite installed on my windows c:\xampplite\
and then I created a symfony project (as described on getting started guide) c:\xampplite\htdocs\symfonytest\
Everything works fine when I tried to access http://localhost/symfonytest/web/ (all icons and text are displayed pretty well)
Now I got to configure the httpd.conf and I type like this:
<VirtualHost 127.0.0.1/symfonytest>
DocumentRoot "c:\xampplite\htdocs\symfonytest\web"
DirectoryIndex index.php
<Directory "c:\xampplite\htdocs\symfonytest\web">
AllowOverride All
Allow from All
</Directory>
Alias /sf c:\xampplite\htdocs\symfonytest\web\sf
<Directory "c:\xampplite\htdocs\symfonytest\web\sf">
AllowOverride All
Allow from All
</Directory>
But it has no effect at all ... when I type http://12开发者_开发问答7.0.0.1/symfonytest/ it still displayed directory list of my c:\xampplite\htdocs\symfonytest\
How to solve this httpd.conf problem?
Thank you !!!
You can't do that using a VirtualHost. Instead, use an Alias:
Alias /symphonytest/ "c:\xampplite\htdocs\symfonytest\web"
<Directory "c:\xampplite\htdocs\symfonytest\web">
AllowOverride All
Allow from All
</Directory>
Alias /sf/ c:\xampplite\htdocs\symfonytest\web\sf
<Directory "c:\xampplite\htdocs\symfonytest\web\sf">
AllowOverride All
Allow from All
</Directory>
This should work as you're expecting it to.
精彩评论