Sometimes when doing development work, or for some other particular workflows, I like to be able to set up web pages/sites/whatever in the Sitesfolder on my Mac. Accessing that material becomes as easy as typing http://localhost/whatever/ into my browser. Making material in the ~/Sites viewable is as easy as navigating to System Preferences and turning on Web Sharing, which starts up apached. But what if you don’t want everyone to share your web? Here’s the file I created in /etc/apache2/users as userhome.conf:

<Directory "/Users/userhome/Sites/">
Options Indexes MultiViews
AllowOverride None
# Order allow,deny
# Allow from all
Allow from 10.0.1.195
</Directory>

Obviously userhome is the short name that you use that is also the name of your home directory — often called $HOME by better geeks than me, but I was afraid if I typed that above, someone would actually use it.

A tip of the cap to Apple for making it so easy to do by following this knowledge base article.