Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
403 Forbidden Error on Mac OS X Localhost

When I go to localhost/~admin/ or my browser says:


You don't have permission to access /~admin/ on this server."

How do I change this?!??!?! It's driving me nuts!

when I go to localhost or my browser says: "It Works!".

I'm running mac osx 10.8.

I created aliases in my .bash_profile file so that I can start, restart and stop Apache quickly:

alias startApache="sudo apachectl start"
alias stopApache="sudo apachectl stop"
alias restartApache="sudo apachectl restart"

In my /etc/apache2/httpd.conf file I turned on php5:

LoadModule php5_module        libexec/apache2/

I also made sure to change the permissions for my admin.conf file with this command in terminal:

sudo chmod 644 username.conf

This is my /etc/apache2/users/admin.conf:

<Directory "/Users/admin/Sites/">
        Options Indexes MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
share|improve this question

marked as duplicate by Ƭᴇcʜιᴇ007, HackToHell, TFM, 8088, Simon Sheehan Dec 8 '12 at 18:15

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Does "~admin" exist? Does the user Apache is running as have permissions to it? – Ƭᴇcʜιᴇ007 Dec 8 '12 at 2:44
@techie007 admin exists. How do I check "the user Apache is running as have permissions to it?" – Pavan Katepalli Dec 8 '12 at 2:57
Check this answer out. – Ƭᴇcʜιᴇ007 Dec 8 '12 at 2:59
Thanks. I went through that page. It's for 10.6. Didn't help. – Pavan Katepalli Dec 8 '12 at 3:08
Just because he's using OSX 10.6 doesn't mean the answers provided don't apply. Did you look at Spiff's answer? From all the info there, what did you actually try? What were your results? – Ƭᴇcʜιᴇ007 Dec 8 '12 at 3:11

This could be as simple as the directory listing option being turned off and there being no (configured) index file (index.html, etc)

1) Try changing the Options line to:

Options +Indexes MultiViews

If a parent directory (or the main apache.conf) has -Indexes (turned off) then without the "+" it won't force it on for the current directory.

2) You could just create a .htaccess file in the desired directory and add the one line:

Options +Indexes

3) Set the index file in admin.conf or .htaccess:

DirectoryIndex index.php,index.html,index.htm

4) Make sure the Apache user at least has read access to the index file. You can do this by checking the permissions. This can be done by pressing Control+I (or Get Info) and making sure Everybody has Read permissions.

These things are good to check if you're having the same problem under Linux with Apache, too.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged .