Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm on Mac OS X and having problem in setting Apache to function properly. When I access localhost it keeps showing 403 forbidden You don't have permission to access this page error. Though I have set Apache to gain access permission on Document Root (AFAK by googling). This is my setting in httpd.conf:

DocumentRoot "/Library/WebServer/Documents"
<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

<Directory "/Library/WebServer/Documents">

Options All
AllowOverride All

Order allow,deny
Allow from all
</Directory>

Is there something I misunderstood here?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You should check file permissions for the /Library/WebServer/Documents folder. The www user should have at least read and execute permissions on the folders and read permissions on the files. Repair privileges if needed.

My settings (OS X 10.8, working webserver) are:

$ ls -la /Library/WebServer/Documents/
total 72
drwxr-xr-x  5 root  wheel    170 10 Dic 04:03 .
drwxr-xr-x  5 root  wheel    170 10 Dic 04:03 ..
-rw-r--r--  1 root  wheel   3726 10 Dic 04:03 PoweredByMacOSX.gif
-rw-r--r--  1 root  wheel  31958 10 Dic 04:03 PoweredByMacOSXLarge.gif
-rw-r--r--  1 root  wheel     44 12 Mar 17:48 index.html.en

Don't forget to check Apache logs into /var/log/apache2/ (you can read them using the built-in Console application).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.