Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can't start httpd/apache on macbook

This is an odd problem which I imported from my Titanium to my Macbook: I can't start personal web sharing. When I do in the control panels, it seems to load endlessly. httpd.conf seems to be ok, as a "httpd -t" returns that syntax is ok.
"httpd -k graceful" returns this:

httpd not running, trying to start
(13)Permission denied: httpd: could not open error log file /Library/Apache2/logs/error_log.
Unable to open logs

an "httpd -E" puts out an error file containing this message:

(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

can anybody help?

Thanks: Mathias

MacPro, iMac G5, Macbook, Quicksilver G4, iPod Nano2, Mac OS X (10.4.10), ...Mac Plus 4MB

Posted on Aug 19, 2007 2:54 AM

Reply
7 replies

Aug 19, 2007 11:37 AM in response to Mathias Dubois

Well, the obvious issue is the fact that you've installed Apache 2.

Mac OS X ships with Apache 1.3 so you're operating outside of the normal bounds. That's not to say you can't do it - you can, but you cannot assume that the OS knows what to do with it - for example, the preferences assume 1.3.

As for your issue, the log seems to clearly indicate what the problem is:

(13)Permission denied: httpd: could not open error log file /Library/Apache2/logs/error_log.


Either the directory /Library/Apache2/logs/ doesn't exist, or apache doesn't have permission to write to it.

The OS isn't going to fix that for you since it knows nothing of /Library/Apache2. The standard location for apache logs is /var/log/httpd

Oct 24, 2007 6:42 AM in response to Mathias Dubois

Hi there.

This is a problem i have encountered.

A working webserver that had been up and running for weeks died.

(I think due to a monthly log rotate, monthly out process)

On trying to restart the server i kept getting a file permissions error relating to the apache log file. usually located /var/log/httpd/error_log

The reason seems to be that as apache starts as root and passes to www, (and i was not logged in as root).
apache could not gain write priveleges to the log file.

i think a process is mis-ordered in the bootsequence.

The solution in my case was to log in as root and start the Web.
Problem solved.

However this may cause problems for those without Root access, there may be other ways around this. - Hope this helps someone.

oh i should point out that i am not using server admin.

so to start : apachectl start



Godbless all.

Jan 3, 2008 11:10 AM in response to Simon2.3

I'm having the same problem but I think due to a different reason. It was all working fine in Tiger but with Leopard, Apache got upgraded to 2.2 and now it gives me this error.

I tried my old G3 with tiger on it and it works fine with no problems on 1.3 but since I upgraded my G5 and MBP with Leopard first thing it did was to tell me that access is forbiden (Error 403) to http://localhost/~user/

I'm trying to get a CMS ironed out before it goes on our server so I am just trying to do it through the Sites folder. I have also installed PHP 5.25 and MySQL 5 on the G5. First I thought that PHP and MySQL wrecked the Appche, but MBP hasn't been touched and it does the same thing.

Full error:

Last login: Thu Jan 3 11:04:50 on console
a-ms-power-mac-g5:~ am$ apachectl -k restart
httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs


I tried to do what previous post said and here is what I got:

a-ms-power-mac-g5:~ am$ sudo /usr/sbin/apachectl start
Password:
org.apache.httpd: Already loaded

I also tried to look for the location to put "logs" folder into and I can't seem to find it.

Help!!!

Can't start httpd/apache on macbook

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.