Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I was doing some reading and it seems running apache standalone is preferred to initd. The book was stating that it's not efficient to run under initd, and that it's also a security risk to run under initd.

They go on further to state that this option of initd or standalone has been removed in apache2. which would make sense since my install asked me nothing of the kind.

So if the option is removed in apache2, what are you running straight out of the box, initd or standalone?

I still start and stop my server via the /etc/init.d/apache2 , so am I running init.d and not standalone, and further more, am i at risk security wise?

is there a way to tell which you are running on?

share|improve this question
3  
Do you mean, "running apache from inetd"? Running a service via inetd (or, rather, xinet.d) and starting it from init.d are very different things. –  cjc Mar 11 '12 at 16:36

3 Answers 3

up vote 1 down vote accepted

Apache initial process requires root privileges to bind to port 80 (http). When it obtains listening socket, it no longer requires root, so it changes its effective user id to user apache.

Running apache manually as root is a possible security risk and not recommended for production environment. Running it as a service, using /sbin/service or /etc/init.d/* is normal practice.

Inetd (xinetd) is another story. There was an option to run apache this way, but it's no longer supported I believe.

share|improve this answer

I think you've misinterpreted something here.

init.d is not inetd (or xinetd).

Your book is referring to inetd (or is written by somebody who has no idea what they're talking about). If it is referring to inetd, then that is correct and very few services are called through xinetd any more.

share|improve this answer

If you are using apache2ctl instead of "official" initscript, you are fine, no risks.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.