Creating a local web-server on MacOS Big Sur

Start the builtin Apache server

You should now be able to direct your browser to ‘localhost’ or ‘’ and see in the browser ‘ it works!’. The default Apache configuration reads from

Apple recommends to create a directory ‘Sites’ in your home account and run your local user website from there. First, create the directory for the website in your home directory

Next, navigate to the apache user configuration directory

where you should see a file with your user name ending with ‘.conf’.

Modify it to

Navigate to the parent directory, and make a backup of the original ‘https.conf’ file.

Edit the file

and uncomment line 16

Next, edit the file

and uncomment line 113

lines 186 and 187

lines 524

and line 555 (the last line)

Make sure the following lines are also uncommented

Finally, restart the apache server

Test the configuration by pointing the browser to you local user site

where ‘username’ is your account name. The account name can found by the command

1 thought on “Setting up Apache User Sites Folders on MacOS”

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top