Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activate Apache/PHP on Mac OS X 10.8.3

Tags:

php

macos

apache

I have a MacBook Pro with OS X 10.8.3 factory installed. I want to set up a working Apache/PHP environment on my local machine. Is this a matter of activating/changing settings in Terminal or do I need to install something?

There have been other guides out there but they don't explicitly answer how to begin if I have a factory installed OS and not an upgrade from an earlier version.

Thanks for any help.

like image 206
user2337994 Avatar asked May 01 '13 01:05

user2337994


2 Answers

If I'm not mistaken, all you have to do is edit the httpd.conf (/etc/apache2/httpd.conf) file to load the php module into apache (Look for 'LoadModule php5_module', it will probably be there, but with a # at the beginning of the line, simply remove it) and then start apache by entering this in terminal: apachectl start (you will maybe need to put 'sudo' before)

Of course this will only run apache and php. After that you can change your documentRoot and all the settings you want

like image 91
Jonathan Pellerin Avatar answered Sep 27 '22 21:09

Jonathan Pellerin


I found a guide that'll walk someone through getting the factory installed Apache and PHP working on OS X 10.8. It goes over getting MySQL installed too:

http://coolestguyplanettech.com/downtown/install-and-configure-apache-mysql-php-and-phpmyadmin-osx-108-mountain-lion

like image 35
user2337994 Avatar answered Sep 27 '22 20:09

user2337994