I am setting up a webserver but I am currently receiving a 403 error when browsing to Localhost. I am setting up "username.conf" and I have a couple of questions:

  1. Since I am not logged in as a user that is not the admin, do I need to rename the username.conf file to the specific user's name?

  2. The path can be something custom like this?

    <Directory "/Users/niccolomineo/Creative Cloud Files/dev/">

This is what is reported in the log

[Sat Aug 02 16:30:34.481180 2014] [autoindex:error] [pid 392] [client ::1:49541] AH01276: Cannot serve directory /Library/WebServer/Documents/: No matching DirectoryIndex (index.html) found, and server-generated directory index forbidden by Options directive

Clearly, for some reason, the path he's trying to serve is still the default one, but I specified a custom one. It is like I cannot override it. How can I fix this?


1 Answer 1


Create the file /etc/apache2/users/niccolomineo.conf and copy the following into the file...

<Directory "/Users/niccolomineo/Creative Cloud Files/dev/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all

Then restart apache sudo apachectl restart and you should find your pages at http://localhost/~niccolomineo.

  • I am with Apache 2.4.9 (Yosemite 10.10), so the rules are slightly different. I know how to do that part. What I don't understand is why it doesn't work. It only works when I change the path straight inside the httpd.conf. Aug 2, 2014 at 22:56
  • Also, when I change the path, it works when I browse to localhost (not when I browse to localhost/~niccolomineo). Aug 3, 2014 at 1:12
  • What are the permissions on the niccolomineo.conf file? They should be something like "-rw-r--r-- 1 root wheel 144 2 Aug 00:00 niccolomineo.conf'. Aug 3, 2014 at 1:17
  • Also search https.conf for the phrase "userdir". There should be two instances. One for the mod_userdir.so library and one for the httpd-userdir.conf file. If either has a hash before it, remove it. Aug 3, 2014 at 1:21

You must log in to answer this question.

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