View previous topic :: View next topic |
Author |
Message |
Noth n00b
Joined: 08 Jan 2003 Posts: 74 Location: Finland/Arizona/NewJersey
|
Posted: Tue Jan 06, 2004 5:31 am Post subject: Starting apache with xinetd |
|
|
Yes I know people think this is stupid, get over it.
I can't seem to get apache2 to start I get an
"(98)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down"
error. Heres my xinetd config:
bash-2.05b# cat /etc/xinetd.d/www
# default: on
# description: web server.
service www
{
socket_type = stream
user = apache
port = 80
wait = no
only_from = localhost
server = /usr/sbin/apache2ctl
server_args = start
disable = no
}
I "could" probably get around this by setting apache to listen to another port, and have xinetd forwared all port 80 request to the different port..... but I don't want to do that. _________________ !!!teG I sdrawkcaB eroM ehT oG I sdrawroF eroM ehT |
|
Back to top |
|
|
BiggJ Guru
Joined: 07 Nov 2003 Posts: 384 Location: /usr/share/ \ zoneinfo/America/Los_Angeles
|
Posted: Tue Jan 06, 2004 5:47 am Post subject: |
|
|
That error indicates that apache (or something else) is already running and using port 80. Question, what are you using xinet.d for apache? You should be able to start it with:
Code: | /etc/init.d/apache start |
Or add it to rc-update as a default services ...
Code: | rc-update add apache default |
... and it will start automatically when you start the machine.
--J |
|
Back to top |
|
|
Noth n00b
Joined: 08 Jan 2003 Posts: 74 Location: Finland/Arizona/NewJersey
|
Posted: Tue Jan 06, 2004 8:27 am Post subject: |
|
|
biggj wrote: | That error indicates that apache (or something else) is already running and using port 80. Question, what are you using xinet.d for apache? You should be able to start it with:
Code: | /etc/init.d/apache start |
Or add it to rc-update as a default services ...
Code: | rc-update add apache default |
... and it will start automatically when you start the machine.
--J |
I'm running this on a laptop for a few simple things ex(phpmcyadmin, acid, etc). And I'm willing to wait the 3 seconds for it to boot up.
As for what is taking up port 80..... It is xinetd. Apache won't take over the port as-is. _________________ !!!teG I sdrawkcaB eroM ehT oG I sdrawroF eroM ehT |
|
Back to top |
|
|
fleed l33t
Joined: 28 Aug 2002 Posts: 756 Location: London
|
Posted: Tue Jan 06, 2004 11:13 am Post subject: |
|
|
Have you configured apache so it knows it's being called from xinetd? If you don't configure it properly it will try to listen on that port and will obviously conflict with xinetd.
Edit: Actually, I don't think there's a way to make apache work from xinetd. At least I couldn't find anything. Maybe you should use thttpd or some other http server instead? |
|
Back to top |
|
|
Noth n00b
Joined: 08 Jan 2003 Posts: 74 Location: Finland/Arizona/NewJersey
|
Posted: Tue Jan 06, 2004 11:30 am Post subject: |
|
|
fleed wrote: | Have you configured apache so it knows it's being called from xinetd? If you don't configure it properly it will try to listen on that port and will obviously conflict with xinetd.
Edit: Actually, I don't think there's a way to make apache work from xinetd. At least I couldn't find anything. Maybe you should use thttpd or some other http server instead? |
I have searched the apache.org site and can't find any mention of starting it with xinet/inet. and the web is just full of "thats stupid, don't do that" remarks.
There is a post 3 months ago on the xinetd mailing list from someone who has the same problem with a different program.....but it wasn't resolved, not on the mailing list at least. _________________ !!!teG I sdrawkcaB eroM ehT oG I sdrawroF eroM ehT |
|
Back to top |
|
|
|