`Apache` `localhost/~username/` not working

Looks like you need to uncomment the following:

#LoadModule userdir_module libexec/apache2/mod_userdir.so

and

#Include /private/etc/apache2/extra/httpd-userdir.conf

Then in httpd-userdir.conf you may need to uncomment:

#Include /private/etc/apache2/users/*.conf

Lastly you would need to create /private/etc/apache2/users/kevin.conf if it doesn’t exist. I think it should look something like this:

<Directory "/Users/kevin/Sites/">
  Options Indexes MultiViews
  AllowOverride None
  Require all granted
</Directory>

Make sure to restart the Apache server afterwards with:

sudo apachectl restart

Leave a Comment