Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Hi folks your help with the following would be much appreciated.
I've got an apache server up and running grandly, but it is seldom used. I want to switch the service off and have it started up through xinetd.
I've done some scouting about on the web looking for the kinds of e.g. server arguments I would need to put into the xinetd.conf file but I'm not having much luck so far. I tried xined.org but they have information for services like telnet, ssh, ftp etc...but not, alas, apache.
This is what I've put in to the xinetd file so far, with no success, to try and run apache from it:
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/httpd
log_on_success += DURATION USERID
log_on_failure += USERID ATTEMPT RECORD
Hi Dubman thanks for your help. I want the service to be off most of the time, but when my website gets a visit I want xinetd to start it automatically so that people can get in to it. That would mean I wouldn't have to leave it on 24/7 and I also wouldn't have to start it manually everythime someone wanted to access it.
Here's a part of the output from the command:
netstat --inet --all
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:http *:* LISTEN
well, I dont think that is possible. If you want someone to be able to access your web server, port 80 will always need to be listening, which is what happens when you turn on the httpd service (apache). With that service disabled, port 80 will fail to respond and web traffic will get denied. I dont think there is a dynamic way to do what you need. Why don't you just leave apache running 24/7? If you are worried about security I would look into IPTables or perhaps setting up a DMZ. By design, when you host a web sever, security is much more lax.
For apache 1.3, you need to set "ServerType inetd" from "standalone" in httpd.conf. The error is happening because apache is trying to bind port 80, which is already taken by xinetd. You should be able to change the user to "nobody" or whatever group that you want (preferable as a user that doesn't login). Apache only needs root to bind port 80 (I think, so experiment).
Actually, if you look at this apache page, it seems that 2.0 doesn't support inetd at all any more.
But, I agree with dubman. There really isn't any point to using xinetd for apache, except for access control. But apache already has good configuration for that. It also logs decently. You already have a complex setup with apache, why not use it?
Hi bastard23 thanks for your input! Your advice worked like a charm - I put the line ServerType inetd into http.conf and sure enough, xinetd starts the http service every time my server gets a (infrequent) call.
I am having the exact same problem with apache and Idon't think I fixedthe httpd.conf file correctly. In fact the servertype line is not there.if possible could one of you post your httpd.conf file? or email it to me?
thanks for your help.
P.S. I have redhat linux 9. from th shrike iso cd images. if that makes sense
Have you tried to run your apache server not through xinetd? I would try that first. Also, do you need to run it from xinetd? I actually don't use this option anymore. There isn't a lot of benefit from it.