Solved: Apache Config and VHosts on Mac OSX 10.5

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.

  1. 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
  2. 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
  3. The Applications/Utilities/Console is your friend. It will surely help identifying why Apache is not working.
  4. Use the System Preferences / Sharing / Web Sharing to start and stop Apache server.
  5. 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
  6. 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)
  7. 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.

Have fun.

Advertisements

About mcloide

Making things simpler, just check: http://www.mcloide.com View all posts by mcloide

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: