I would like to run a personal website that is accessible across users on the local area network. Specifically, imagine we have Mac #1 talking to Mac #2 via a router and the goal is to access a webpage on Mac #2 from Mac #1 via a URL like this: http://myMachineNo2.local/~myUserName/myGreatSite.html. Where that URL maps to this file on the Mac #2: /Users/myUserName/www/myGreatSite.html. This kind of thing used to work off the shelf. Now, it seems to require some config edits. For instance, see here. Those instructions work for a local user working at Mac #2. That is, http://localhost/~myUserName/myGreatSite.html works. But, for me, these instructions will not grant access from Mac #1. What additional steps are required to grant Mac #1 access? Currently, I get 403 error: Forbidden: You don't have permission to access this resource.

I am using Mojave but, it would be nice to see an answer with broad applicability.

1 Answer 1


The pages you linked provide very precise instructions for getting started on a web site which will only be accessed from localhost. It does not go any further.

If you look at the content of /etc/apache2/users/<user>.conf it includes the line Require host localhost. Change that to Require all granted.

But now you are exposed to the world, only protected by your router.

Be very careful exposing Apache even to the local network, particularly as Mojave has an old version of Apache with various vulnerabilities. If you want to run Apache on an old insecure macOS, I would make sure you have the latest Apache. You can install it using Homebrew.

  • excellent point about homebrew apache. thanks!
    – jbjo
    May 17, 2022 at 1:06
  • @jbjo A bit more on that point: Today's 12.4 macOS updates apache to the latest version and it is listed as one of the security fixes (5 vulnerabilities). But no updates for apache in macOS 11 or older. Apple do seem to be taking apache updates seriously (something that has not always been true) for whatever is the latest macOS.
    – Gilby
    May 17, 2022 at 3:02

You must log in to answer this question.

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