brianpuccio.net

it's dot com

Out Of The Box Apache On OS X

Date: Thursday, February 28, 2008 - 9:15pm
Keywords: apache, OS X, linux, virtualization
Links: 226 reads

I figured since I was using OS X and it touts being UNIX compliant that for a local web development sandbox, I'd just use a local install of apache instead of a virtualized Linux install. I thought all I had to do was go to System Preferences, go to Sharing, then tick the checkbox next to Web Sharing and I'd be good to go. This is OS X after all, not some complicated Linux install that requires some arcane knowledge to administer.

Didn't work. Got an access denied when I tried to view my localhost. Fan-fail-tastic.

I went to check the access logs, which I assumed were in /var/log/apache2/error.log but there wasn't even a /var/log/apache2 directory to look in. OK, check out /var/log/system.log. Hmm, this stands out:

No such file or directory: httpd: could not open error log file /usr/logs/error_log

A quick search yields the solution, you need to do a sudo mkdir -p /var/log/apache2 first and make sure the error log is set to log there. (I'm not sure why so many paths are prefixed with /private

While the config file isn't how I'm used to seeing things and the entire a2ensite and a2dissite thing doesn't work this way, it does work. Though I find it really interesting that in the modern Linux distros that I've used, apache worked out of the box, but under OS X, it doesn't.

Onward.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <blockquote> <img> <h1> <h2> <h3> <h4> <del> <ins>
  • Lines and paragraphs break automatically.

More information about formatting options

Recent Photos

I've got several hundred photos offline that I've been meaning to upload, just never got around to it.

  • Adam Savage At HOPE
  • Adam Savage Talks About His Dodo (And His OCD) At HOPE
  • Adam Savage At HOPE
  • Kevin Mitnick Shows Us How To Unmask Blocked Caller IDs At HOPE
  • Kevin Mitnick At HOPE
  • Kevin Mitnick At HOPE
  • Kevin Mitnick At HOPE
  • Kevin Mitnick At HOPE
  • Kevin Mitnick And Emmanuel Goldstein At HOPE
  • Kevin Mitnick And Emmanuel Goldstein At HOPE
  • Kevin Mitnick And Emmanuel Goldstein At HOPE
  • Steven Rambam, PI, Talks About Privacy And How You Have None At HOPE
  • Algormor Shows Off Bagcam Footage At HOPE
  • Ray Beckerman Discuesses Ways To Fight Back Against The RIAA At HOPE
  • RenderMan Discuss Wireless Vulnerabilites At HOPE
  • Gillian Andrews Talks About OLPC At HOPE
  • Phil Lapsley Discusses FOIA At HOPE
  • Virgirl Griffith Shows Off WikiiWatcher 2 At HOPE To A Standing Room Only Crowd
  • Virgirl Griffith Shows Off WikiiWatcher 2 At HOPE
  • Virgirl Griffith Shows Off WikiiWatcher 2 At HOPE

Recent Blogs

Recent Excerpts

User login