« Demo of Enthought's TraitsUI with matplotlib and a popup menu | Main | Easily manage photos & videos on iPhones & iPads »
Monday
Jun302014

Turn web sharing back on in Mountain Lion

Another one of those tips I've had to re-google one too many times.

I want to be able to open web pages/data saved in ~/Sites.

First, create a configuration file /etc/apache2/users/USERNAME.conf containing:

<Directory "/Users/USERNAME/Sites/">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>

To turn on temporarily until next restart:

sudo apachectl start

To turn on more than temporarily (may need a restart or the above command to turn on for first time):

sudo defaults write /System/Library/LaunchDaemons/org.apache.httpd Disabled -bool false

This tip is available in multiple places such as here.

(And, yes, I really should upgrade that MacMini to Mavericks one of these days....)