8

I've always used: Setting up a local web server on OS X to set up my localhost and userdirs.

After upgrading to Sierra, yesterday, my localhost web server wasn't working anymore.

I tried following the tutorial again but I'm not able to get into my userdir.

localhost works:

works

user shortname - fails:

fail

Are there any other configurations that need to be made on Sierra to get userdirs to work?

1 Answer 1

9

There is an updated tutorial here: How to Set up Apache in macOS Sierra 10.12

It includes extra configurations like uncommenting the following lines by removing the "#":

#LoadModule userdir_module libexec/apache2/mod_userdir.so
...
#LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
...
#Include /private/etc/apache2/extra/httpd-userdir.conf
...
#Include /private/etc/apache2/extra/httpd-vhosts.conf

in /etc/apache2/httpd.conf

and uncommenting:

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

in /etc/apache2/extra/httpd-userdir.conf

and restarting apache: sudo apachectl restart

It should work.

7
  • You said "It should work.", but does it!? Sep 22, 2016 at 3:04
  • @user3439894 yeah it does, for me.
    – Mou某
    Sep 22, 2016 at 6:32
  • 1
    In Sierra, I get the following error: when files in the user directory aren't found, Sierra tries to find them in localhost. But localhost is not accessible, I get the error: 403 Forbidden. What setting could have changed in Sierra? It worked in El Capitan. Jan 12, 2017 at 14:39
  • i'm getting a 403 forbidden, and your link is dead
    – abbood
    Jan 13, 2017 at 7:01
  • 1
    The answer above is only the specific changes made in Sierra, you still need to make the basic other changes that you did before on other OS's. You can look at the link in the question.
    – Mou某
    Jan 13, 2017 at 12:59

You must log in to answer this question.

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