Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My linux distribution has a file /etc/sysconfig/httpd that appears to be related to the configuration of Apache server

Can anyone explain what role this plays in the configuration and why it differs from the role the standard httpd.conf configuration file has - why are there two configuration files?

share|improve this question

2 Answers 2

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."

share|improve this answer

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.

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.