Skip to content

Instantly share code, notes, and snippets.

@tom-henderson
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tom-henderson/3905f332592ed1f87411 to your computer and use it in GitHub Desktop.
Save tom-henderson/3905f332592ed1f87411 to your computer and use it in GitHub Desktop.
Enable apache on OS X Mavericks
#!/bin/bash
# Create a user.conf
cat > /etc/apache2/users/$(whoami).conf <<EOF
<Directory "/Users/$(whoami)/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
EOF
# Enable the Launch Daemon for apache
sudo defaults write /System/Library/LaunchDaemons/org.apache.httpd Disabled -bool false
# Start apache
apachectl start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment