Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Starting apache with xinetd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Noth
n00b
n00b


Joined: 08 Jan 2003
Posts: 74
Location: Finland/Arizona/NewJersey

PostPosted: Tue Jan 06, 2004 5:31 am    Post subject: Starting apache with xinetd Reply with quote

Yes I know people think this is stupid, get over it. :roll:

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
View user's profile Send private message
BiggJ
Guru
Guru


Joined: 07 Nov 2003
Posts: 384
Location: /usr/share/ \ zoneinfo/America/Los_Angeles

PostPosted: Tue Jan 06, 2004 5:47 am    Post subject: Reply with quote

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
View user's profile Send private message
Noth
n00b
n00b


Joined: 08 Jan 2003
Posts: 74
Location: Finland/Arizona/NewJersey

PostPosted: Tue Jan 06, 2004 8:27 am    Post subject: Reply with quote

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
View user's profile Send private message
fleed
l33t
l33t


Joined: 28 Aug 2002
Posts: 756
Location: London

PostPosted: Tue Jan 06, 2004 11:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Noth
n00b
n00b


Joined: 08 Jan 2003
Posts: 74
Location: Finland/Arizona/NewJersey

PostPosted: Tue Jan 06, 2004 11:30 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum