Mac is a great resource and it already comes with it’s own Apache and PHP installation inside. In the last 24 hours I have been on a fight with Apache on Mac to get it correctly configured so I have came with some highlights that will be useful to all.
- Download TextWrangler – It will allow you to see hidden folders and files (open hidden) making the changes on the httpd.conf and vhosts.conf much more easier
- All Apache config files are under /private/etc/apache2 unless you have compiled your own version of Apache and in that case you should run a command “which httpd” to show you some clues
- The Applications/Utilities/Console is your friend. It will surely help identifying why Apache is not working.
- Use the System Preferences / Sharing / Web Sharing to start and stop Apache server.
- By default Apache httpd.conf on Mac has everything set to “Deny from all” (line 177 about) so set it to “Allow from all” and the permissions issues should get set
- Make sure that :staff is the group set with read and write permissions to the Sites folder or the folder where the document root for your site is set (you can do this with getInfo on finder)
- Use Apache Error log as much as you can to get things set and as a note I haven’t been able to set a custom error log for my sites, so this was one of the things breaking my configs.
Next steps, getting PHP set. Will be more posts.