By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,720 Members | 1,030 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,720 IT Pros & Developers. It's quick & easy.

can't start Apache on Mac OS X--no listening sockets available?

P: n/a
I'm trying to get Apache set up on my system so I can use mod_python.
I installed Apache 2.2.4 according to the following instructions:

http://switch.richard5.net/isp-in-a-...#comment-30704

and everything seemed to install correctly, but I can't start Apache.
I typed in the following command:

$ sudo /Library/Apache2/bin/apachectl start
Password:

and I got this error message:

httpd: Could not reliably determine the server's fully qualified
domain name, using tms-computer.local for ServerName
(48)Address already in use: make_sock: could not bind to address
0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

Any ideas?

Jun 26 '07 #1
Share this Question
Share on Google+
10 Replies


P: n/a
On Jun 25, 7:23 pm, 7stud <bbxx789_0...@yahoo.comwrote:
I'm trying to get Apache set up on my system so I can use mod_python.
I installed Apache 2.2.4 according to the following instructions:

http://switch.richard5.net/isp-in-a-...pache-on-mac-o...

and everything seemed to install correctly, but I can't start Apache.
I typed in the following command:

$ sudo /Library/Apache2/bin/apachectl start
Password:

and I got this error message:

httpd: Could not reliably determine the server's fully qualified
domain name, using tms-computer.local for ServerName
(48)Address already in use: make_sock: could not bind to address
0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

Any ideas?
Do you have "Web Sharing" in the prefs on as well? Possibly the built-
in apache is already started on port 80.

I've had luck with these: http://www.serverlogistics.com/downloads.php

Except it's tuff to compile new versions into these. I failed at
getting PHP5 running under it, but they work well out of the box.

~Sean

Jun 26 '07 #2

P: n/a
On Jun 25, 7:23 pm, 7stud <bbxx789_0...@yahoo.comwrote:
>

I'm trying to get Apache set up on my system so I can use mod_python.
I installed Apache 2.2.4 according to the following instructions:
http://switch.richard5.net/isp-in-a-...pache-on-mac-o...
and everything seemed to install correctly, but I can't start Apache.
I typed in the following command:
$ sudo /Library/Apache2/bin/apachectl start
Password:
and I got this error message:
httpd: Could not reliably determine the server's fully qualified
domain name, using tms-computer.local for ServerName
(48)Address already in use: make_sock: could not bind to address
0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Any ideas?

Do you have "Web Sharing" in the prefs on as well?
I checked and to my surprise Personal Web Sharing was turned on. I
was messing around with it yesterday because I thought that might have
something to do with my problems, but I couldn't get Personal Web
Sharing to start--it just said "Web Sharing starting up...", and it
never did.

Anyway, I turned Personal Web Sharing off, and then the error message
changed to this:

$ sudo /Library/Apache2/bin/apachectl start
Password:
httpd: Could not reliably determine the server's fully qualified
domain name, using tms-computer.local for ServerName

However, I checked the All Processes page in the Activity Monitor, and
it said httpd was running. So I tested my apache installation by
typing http:/localhost in Safari's address bar, and a page displayed
saying "It works!". But I wondered if that page was being served up
by the pre-installed version of Apache or my new installation. So, I
went into my new installation's directory and looked at the file:

/Library/Apache2/htdocs/index.html

and changed the text from "It works!" to "Apache 2.2.4", but when I
retyped http:/localhost in Safari's address bar, I still got a page
saying "It works!", so that page is not being served by my new
installation.

Jun 26 '07 #3

P: n/a
Ok. If I try to start Personal Web Sharing while Apache is running,
it says "Web Sharing starting up...", but it never does. Then if I
close the window and restart my imac, my imac boots up with Personal
Web Sharing turned on.

I still can't figure out where the page that says "It works!" is
located. It must be in the pre installed apache directory, but I have
no idea where it is on my imac. And, I don't understand why the page
isn't being served up by my new installation since I started the new
Apache using the command:

$sudo /Library/Apache2/bin/apachectl start

I didn't start the pre-installed Apache.

Also, when I look at the Activity monitor, there is an httpd root
process with pid 285, and then there are 6 daemon http processes with
pids 286, 287, 288, 289, 290, 291. What is that all about?

Jun 26 '07 #4

P: n/a
On 6/26/07, 7stud <bb**********@yahoo.comwrote:
Ok. If I try to start Personal Web Sharing while Apache is running,
it says "Web Sharing starting up...", but it never does. Then if I
close the window and restart my imac, my imac boots up with Personal
Web Sharing turned on.

I still can't figure out where the page that says "It works!" is
located. It must be in the pre installed apache directory, but I have
no idea where it is on my imac. And, I don't understand why the page
isn't being served up by my new installation since I started the new
Apache using the command:

$sudo /Library/Apache2/bin/apachectl start

I didn't start the pre-installed Apache.

Also, when I look at the Activity monitor, there is an httpd root
process with pid 285, and then there are 6 daemon http processes with
pids 286, 287, 288, 289, 290, 291. What is that all about?

--
http://mail.python.org/mailman/listinfo/python-list
If apache2 works on macs how it does on linux (it should, right?)
there should be Apache2/sites-enabled and Apache2/sites-available
directories - the "default" files in these will tell you what pages
are being served, I believe.

Maybe apachectl restart?

Also, I think the processes are normal, but I'm not sure. Apache is a
pretty heavyweight server.
Jun 26 '07 #5

P: n/a
On Jun 26, 12:52 am, kaens <apatheticagnos...@gmail.comwrote:
If apache2 works on macs how it does on linux (it should, right?)
there should be Apache2/sites-enabled and Apache2/sites-available
directories - the "default" files in these will tell you what pages
are being served, I believe.
There are no such directories in my new installation directory /
Library/Apache2
Also, I think the processes are normal, but I'm not sure. Apache is a
pretty heavyweight server.
Ok.
Jun 26 '07 #6

P: n/a
Well, I'm able to put html pages in /Library/Apache2/htdocs/ and
access them in Safari as I would expect:

http://localhost/test.htm

and I can access the index.html page in that directory:

http://localhost/index.html

and it displays:

It works! Apache 2.2.4

But, if I just use the address http://localhost/ in Safari, this is
displayed:

It works!

Where is that coming from? Is the original index.html page(before I
changed it and added "Apache 2.2.4") cached by Safari somehow? That
doesn't make any sense to me because when I explicitly request
index.html, I get the changed output.
Jun 26 '07 #7

P: n/a
On Jun 26, 1:34 am, 7stud <bbxx789_0...@yahoo.comwrote:
Where is that coming from? Is the original index.html page(before I
changed it and added "Apache 2.2.4") cached by Safari somehow? That
doesn't make any sense to me because when I explicitly request
index.html, I get the changed output.
I looked around in Safari for a bit, and I found Empty Cache under the
Safari menu item. So I emptied the cache and now when I use the
address http://localhost, I get the changed index.html page. So
Safari was caching the original page. I guess Safari associate the
address http://localhost with the original index.html page, and Safari
would not display the updated index.html page when I used that address
again.

Jun 26 '07 #8

P: n/a
On Jun 25, 11:09 pm, 7stud <bbxx789_0...@yahoo.comwrote:
On Jun 25, 7:23 pm, 7stud <bbxx789_0...@yahoo.comwrote:
I'm trying to get Apache set up on my system so I can use mod_python.
I installed Apache 2.2.4 according to the following instructions:
>http://switch.richard5.net/isp-in-a-...pache-on-mac-o...
and everything seemed to install correctly, but I can't start Apache.
I typed in the following command:
$ sudo /Library/Apache2/bin/apachectl start
Password:
and I got this error message:
httpd: Could not reliably determine the server's fully qualified
domain name, using tms-computer.local for ServerName
(48)Address already in use: make_sock: could not bind to address
0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Any ideas?
Do you have "Web Sharing" in the prefs on as well?

I checked and to my surprise Personal Web Sharing was turned on. I
was messing around with it yesterday because I thought that might have
something to do with my problems, but I couldn't get Personal Web
Sharing to start--it just said "Web Sharing starting up...", and it
never did.

Anyway, I turned Personal Web Sharing off, and then the error message
changed to this:

$ sudo /Library/Apache2/bin/apachectl start
Password:
httpd: Could not reliably determine the server's fully qualified
domain name, using tms-computer.local for ServerName

However, I checked the All Processes page in the Activity Monitor, and
it said httpd was running. So I tested my apache installation by
typing http:/localhost in Safari's address bar, and a page displayed
saying "It works!". But I wondered if that page was being served up
by the pre-installed version of Apache or my new installation. So, I
went into my new installation's directory and looked at the file:

/Library/Apache2/htdocs/index.html

and changed the text from "It works!" to "Apache 2.2.4", but when I
retyped http:/localhost in Safari's address bar, I still got a page
saying "It works!", so that page is not being served by my new
installation.
Console and the system logs are an invaluable debugging tool on Macs.
Bet you have some errors there saying why apache couldnt stop/start.

Glad you got it working.

~Sean

Jun 26 '07 #9

P: n/a
Console and the system logs are an invaluable debugging tool on Macs.
Bet you have some errors there saying why apache couldnt stop/start.
What/where is Console and how do I look at the system logs?

Jun 26 '07 #10

P: n/a
7stud a écrit :
I'm trying to get Apache set up on my system so I can use mod_python.
I installed Apache 2.2.4 according to the following instructions:

http://switch.richard5.net/isp-in-a-...#comment-30704

and everything seemed to install correctly, but I can't start Apache.
I typed in the following command:

$ sudo /Library/Apache2/bin/apachectl start
Password:

and I got this error message:

httpd: Could not reliably determine the server's fully qualified
domain name, using tms-computer.local for ServerName
(48)Address already in use: make_sock: could not bind to address
0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

Any ideas?
yes : please post on a Mac newsgroup. This has nothing to do with Python.

This group is highly tolerant[1], but you'll probably find the best
answers on a mac-related newsgroup, because that's where the Mac expert
are (or at least are supposed to be).

[1] as a matter of fact, you got some answers to a totally OT post not
even labelled as such - on some ng you would have been shot down in
flames instead...
Jun 26 '07 #11

This discussion thread is closed

Replies have been disabled for this discussion.