Apache and PHP on OS X Yosemite

Apache and PHP on OS X Yosemite

It’s just a short instructions how to run Apache and PHP on OS X Yosemite.

PHP and Apache are already there – just need to run Apache and enable PHP. Video showing up whole process is available here:

Here you can check out exact changes.

Firsting first – we have to run Apache

sudo apachectl start

Then make some changes in httpd.conf file

sudo nano /etc/apache2/httpd.conf

Find two lines

LoadModule rewrite_module libexec/apache2/mod_rewrite.so
LoadModule php5_module libexec/apache2/libphp5.so

and uncomment them. To enable PHP and mod_rewrite.
And then restart Apache –

sudo apachectl restart

You can also enable .htaccess by changing one more line

AllowOverride none


AllowOverride All

It’s also nice to enable directory indexing as long it’s our dev environment

Options +Indexes