Lots of developers use MAMP for local PHP development. There’s nothing wrong with MAMP. It works. But I wanted to find out how to use the pre-installed Apache and PHP in Lion.
Prerequisites
Ensure these directories exist:
$ sudo mkdir /usr/local/include $ sudo mkdir /usr/local/bin $ sudo mkdir /usr/local/lib $ sudo mkdir -p /usr/local/man/man1
Setup Apache2
$ sudo chmod u+w /etc/apache2/httpd.conf $ sudo vim httpd.conf
Uncomment #LoadModule php5_module libexec/apache2/libphp5.so.
To enable virtual hosts, uncomment #Include /private/etc/apache2/extra/httpd-vhosts.conf.
Enable .htaccess files by finding Directory… more