home / blog

PHP with apache on Mac OS X

Enable apache server with System Preferences -> Sharing -> Web Sharing -> Enable

sudo emacs /etc/apache2/httpd.conf

# Comment in the following lines
#LoadModule php5_module        libexec/apache2/libphp5.so
#LoadModule fastcgi_module     libexec/apache2/mod_fastcgi.so

# Restart apache to pickup config changes
sudo /usr/sbin/apachectl restart

By default two sites are setup. http://localhost/ which maps onto /Library/WebServer/Documents/ and http://localhost/~user which map onto /Users/username/Sites/.

This entry was posted in geek and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published.