403 with Apache and Symfony on Ubuntu 10.04

Posted by Dominic Santos on Server Fault See other posts from Server Fault or by Dominic Santos
Published on 2010-09-04T09:03:20Z Indexed on 2011/11/17 9:56 UTC
Read the original article Hit count: 333

Filed under:
|
|

I'm trying to run symfony on my apache installation (I'm using xampp for the whole package) and it keeps giving me a 403 error every time I try to access my website.

I've got vhosts set up with the following:

<VirtualHost *:80>
  ServerName localhost
  DocumentRoot "/opt/lampp/htdocs"
  DirectoryIndex index.php
  <Directory "/opt/lampp/htdocs">
    AllowOverride All
    Allow from All
  </Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName servername.localhost
    DocumentRoot /home/me/web/server/web
    DirectoryIndex index.php
    Alias /sf "/lib/vendor/symfony/data/bin/web/sf"

    <Directory "/home/me/web/server/web">
      AllowOverride All
      Allow from All
    </Directory>
</VirtualHost>

<Directory "/lib/vendor/symfony/data/bin/web/sf">
    Allow from All
</Directory>

I've also added "127.0.0.1 servername.localhost" in my hosts file.

When I try to access "servername.localhost" it just gives me a 403 error. I've chmod'd 777 the symfony directory and my website directory in my home directory and used './symfony project:permissions' to let symfony check that permissions are set up correctly but still not result.

If I move my website directory into "/opt/lampp/htdocs" then it will serve it from there but still has problems access the symfony stuff such as the debug toolbar.

Any help would be appreciated.

© Server Fault or respective owner

Related posts about apache2

Related posts about ubuntu