Forbidden access on Apache in Mac Lion
I'm trying to configure Apache to work with Symfony in my Macbook Pro. I Have installed Lion OsX.

1. I uncommented the line **Include /private/etc/apache2/extra/httpd-vhosts.conf**  on */etc/apache2/httpd.conf*.
2. I configured Apache by editing the */private/etc/apache2/extra/httpd-vhosts.conf*. An adding the following:

    NameVirtualHost *:80

    &lt;VirtualHost *.80&gt;
      ServerName localhost
      DocumentRoot &quot;/Library/WebServer/Documents&quot;
    &lt;/VirtualHost&gt;

    &lt;VirtualHost *:80&gt;
       DocumentRoot &quot;/Users/luiscberrocal/Documents/dev/lion_test/web&quot;
       ServerName lion.localhost
       &lt;Directory &quot;/Users/luiscberrocal/Documents/dev/lion_test/web&quot;&gt;
          Options Indexes FollowSymlinks
          AllowOverride All
          Order allow,deny
       Allow from all
      &lt;/Directory&gt;
     &lt;/VirtualHost&gt;

3. Added the following to */private/etc/hosts*
    127.0.0.1   lion.localhost

Now when I access http://localhost/test.php I get the following message

Forbidden

You don't have permission to access /test.php on this server.

Apache/2.2.20 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch Server at localhost Port 80

I already tried:

    chmod 777 test.php

    chmod +x test.php 

I get the same message if I try to access http://lion.localhost/

I opened the /var/log/apache2/error_log and this is what I found relevant


    [Sat Dec 31 09:37:49 2011] [notice] Apache/2.2.20 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch configured -- resuming normal operations
    [Sat Dec 31 09:37:53 2011] [error] [client ::1] (13)Permission denied: access to /test.php denied
    [Sat Dec 31 09:37:55 2011] [error] [client ::1] (13)Permission denied: access to /test.php denied
    [Sat Dec 31 09:38:13 2011] [notice] caught SIGTERM, shutting down
    [Sat Dec 31 09:38:13 2011] [error] (EAI 8)nodename nor servname provided, or not known: Could not resolve host name *.80 -- ignoring!
httpd: Could not reliably determine the server's fully qualified domain name, using Luis-Berrocals-MacBook-Pro.local for ServerName
    [Sat Dec 31 09:38:14 2011] [warn] mod_bonjour: Cannot stat template index file '/System/Library/User Template/English.lproj/Sites/index.html'.
    [Sat Dec 31 09:38:14 2011] [warn] mod_bonjour: Cannot stat template index file '/System/Library/User Template/English.lproj/Sites/index.html'.
    [Sat Dec 31 09:38:14 2011] [notice] Digest: generating secret for digest authentication ...
    [Sat Dec 31 09:38:14 2011] [notice] Digest: done
    [Sat Dec 31 09:38:14 2011] [notice] Apache/2.2.20 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch configured -- resuming normal operations
    [Sat Dec 31 09:38:18 2011] [error] [client ::1] (13)Permission denied: access to /test.php denied
    [Sat Dec 31 09:38:19 2011] [error] [client ::1] (13)Permission denied: access to /test.php denied
    [Sat Dec 31 10:18:09 2011] [error] [client 127.0.0.1] (13)Permission denied: access to /test.php denied
    [Sat Dec 31 10:18:15 2011] [error] [client 127.0.0.1] (13)Permission denied: access to / denied

I can't figure out what I'm doing wrong. Thanks in advance.




Forbidden access on Apache in Mac Lion
===

I'm trying to configure Apache to work with Symfony in my Macbook Pro. I Have installed Lion OsX.

1. I uncommented the line **Include /private/etc/apache2/extra/httpd-vhosts.conf**  on */etc/apache2/httpd.conf*.
2. I configured Apache by editing the */private/etc/apache2/extra/httpd-vhosts.conf*. An adding the following:

    NameVirtualHost *:80

    &lt;VirtualHost *.80&gt;
      ServerName localhost
      DocumentRoot &quot;/Library/WebServer/Documents&quot;
    &lt;/VirtualHost&gt;

    &lt;VirtualHost *:80&gt;
       DocumentRoot &quot;/Users/luiscberrocal/Documents/dev/lion_test/web&quot;
       ServerName lion.localhost
       &lt;Directory &quot;/Users/luiscberrocal/Documents/dev/lion_test/web&quot;&gt;
          Options Indexes FollowSymlinks
          AllowOverride All
          Order allow,deny
       Allow from all
      &lt;/Directory&gt;
     &lt;/VirtualHost&gt;

3. Added the following to */private/etc/hosts*
    127.0.0.1   lion.localhost

Now when I access http://localhost/test.php I get the following message

Forbidden

You don't have permission to access /test.php on this server.

Apache/2.2.20 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch Server at localhost Port 80

I already tried:

    chmod 777 test.php

    chmod +x test.php 

I get the same message if I try to access http://lion.localhost/

I opened the /var/log/apache2/error_log and this is what I found relevant


    [Sat Dec 31 09:37:49 2011] [notice] Apache/2.2.20 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch configured -- resuming normal operations
    [Sat Dec 31 09:37:53 2011] [error] [client ::1] (13)Permission denied: access to /test.php denied
    [Sat Dec 31 09:37:55 2011] [error] [client ::1] (13)Permission denied: access to /test.php denied
    [Sat Dec 31 09:38:13 2011] [notice] caught SIGTERM, shutting down
    [Sat Dec 31 09:38:13 2011] [error] (EAI 8)nodename nor servname provided, or not known: Could not resolve host name *.80 -- ignoring!
httpd: Could not reliably determine the server's fully qualified domain name, using Luis-Berrocals-MacBook-Pro.local for ServerName
    [Sat Dec 31 09:38:14 2011] [warn] mod_bonjour: Cannot stat template index file '/System/Library/User Template/English.lproj/Sites/index.html'.
    [Sat Dec 31 09:38:14 2011] [warn] mod_bonjour: Cannot stat template index file '/System/Library/User Template/English.lproj/Sites/index.html'.
    [Sat Dec 31 09:38:14 2011] [notice] Digest: generating secret for digest authentication ...
    [Sat Dec 31 09:38:14 2011] [notice] Digest: done
    [Sat Dec 31 09:38:14 2011] [notice] Apache/2.2.20 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch configured -- resuming normal operations
    [Sat Dec 31 09:38:18 2011] [error] [client ::1] (13)Permission denied: access to /test.php denied
    [Sat Dec 31 09:38:19 2011] [error] [client ::1] (13)Permission denied: access to /test.php denied
    [Sat Dec 31 10:18:09 2011] [error] [client 127.0.0.1] (13)Permission denied: access to /test.php denied
    [Sat Dec 31 10:18:15 2011] [error] [client 127.0.0.1] (13)Permission denied: access to / denied

I can't figure out what I'm doing wrong. Thanks in advance.



