I'm trying to set up Symfony2 as per the guide on their website. I'm running Apache2 on my local Ubuntu machine.
I have managed to resolve all of the errors mentioned in
localhost/Symfony/web/config.php
(which works as expected), but when I try to follow either of the links from there:
localhost/Symfony/web/app_dev.php/_configurator/ or localhost/Symfony/web/app_dev.php/
I get a 404 error. If I go instead to
localhost/Symfony/web/app_dev.php
then the page works, but then again, all links fro开发者_运维百科m it are broken. Could this be an Apache config issue?
your document root of your apache should point to the web directory of symfony
if i assume the following is the path to the php file:
/var/www/Symfony/web/app_dev.php
you should point your apaches document root to:
/var/www/Symfony/web/
ensure apaches rewrite engine is on and htaccess files are correctly read.
enable apaches rewrite engine:
a2emod rewrite
if this doesn't help, try adding/moving your question to stackoverflow.com, its more a symfony specific question, there you find more symfony user.
https://stackoverflow.com/questions/tagged/symfony-2.0
You will need to add the AcceptPathInfo directive to your .htaccess or your vhost:
AcceptPathInfo On
http://httpd.apache.org/docs/2.0/mod/core.html#acceptpathinfo
This is a strange oversight in the Symfony installation / configuration guide.. It seems that the issue has been known about for a long while and yet a solution hasn't been integrated/document anywhere official.
精彩评论