what is the role of /etc/sysconfig/httpd configuration file in apache server . can u explain with some example

link|improve this question

0% accept rate
feedback

2 Answers

This page http://wiki.apache.org/httpd/DistrosDefaultLayout says "There is an extra config file in /etc/sysconfig/httpd which can be used to change to the worker mpm /usr/sbin/httpd.worker."

link|improve this answer
feedback

This is distribution dependent. I have CentOS (a clone of RedHat advanced server) and i have this file.

When you start your machine, the init process looks at a bunch of scripts to see what to start. One may be httpd (you can configure apache to start or not with chkconfig). If you look at your /etc/init.d/httpd script, you can see that it checks for /etc/sysconfig/httpd and if so sources it (as if it was a part of the current script). So now any variable definitions in /etc/sysconfig/httpd get applied for the rest of the script.

The examples you see in the file are to set HTTPD, which is a variable set to the executable name. In my distro, by default you use the old prefork module, but you can set to use the multithreaded /usr/sbin/httpd.worker here if you like. You can also set OPTIONS, which are command line options given to httpd (a.k.a. $HTTPD). There really isn't anything else you can set (you can ignore HTTPD_LANG, if you don't know if you need it, you don't need it)

So, if you want the multithreaded server, set HTTPD=/usr/sbin/httpd.worker. This probably won't break anything in the default apache, though some add-ons that you add may (but unlikely) break under multithreaded apache.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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