apache on OSX 10.8 not starting
I had Apache working on my 10.8 MPBR. I haven't used it for a few weeks, and now it doesn't seem to start. I get nothing in /private/var/log/apache2. Nothing, meaning no logging at all, error or otherwise. Permission on the log folder is drwxr-xr-x root wheel
I have tried all ways of starting, stopping, and restarting apache. I have checked for activity on port 80, there is nothing happening.
Configtest is Syntax OK
. I have not fiddled with apache in any way in the time between now and when it was last working.
I do get a 'weird reason' error in the console.
1/17/13 8:47:34.592 PM com.apple.launchd[1]: (org.apache.httpd) Throttling respawn: Will start in 10 seconds
1/17/13 8:47:44.594 PM com.apple.launchd[1]: (org.apache.httpd[22855]) Job failed to exec(3). Setting up event to tell us when to try again: 2: No such file or directory
1/17/13 8:47:44.594 PM com.apple.launchd[1]: (org.apache.httpd[22855]) Job failed to exec(3) for weird reason: 2
1/17/13 8:47:44.594 PM com.apple.launchd[1]: (org.apache.httpd) Job should be able to exec(3) now.
The 'No such file or directory' bit is suspicious, but don't know what file/dir is missing. My next move will be to try and start from a plain vanilla setup and see if that works.
I'd rather not install MAMP, I only need the web server, so hopefully I can figure out what got borked.
Anyone know how to get better debugging on what the Console is on about?
Anyone care to guess what might have gotten out of whack?
Solution 1:
I had exactly the same problem. I started Apache without DocumentRoot(s). It did the trick.
sudo apachectl -T
Solution 2:
I've seen similar just today, no logs and apache acted like it was started. The issue for me was a bad vhost file.
sudo apachectl -S
this allowed me to see the error
Solution 3:
I've had similar issue with apache and I found our what was wrong (and in which config file) with this command:
sudo apachectl configtest
I found out about this from this forum post about apache issues.