Forum Moderators: phranque

Message Too Old, No Replies

Why are there two configuration files for Apache?

apache configuration

         

backpacker

5:52 am on Nov 30, 2005 (gmt 0)

10+ Year Member



One is at /etc/conf/httpd.conf ,the other at /usr/local/apache2/conf/httpd.confi.There are many of differences between them.Why?Thanks.
Regards

ChadSEO

6:21 pm on Dec 1, 2005 (gmt 0)

10+ Year Member



backpacker,

The default location for httpd.conf is in /usr/local/apache2/conf/httpd.conf. If you install from source using the defaults, this is where it is located. If you install apache with a package manager, like RPM, then it usually gets installed in a different location, and httpd.conf will reside in /etc/httpd/conf/. What likely happened was Apache was installed by a package manager, then removed, and reinstalled from source. Typically, if you've made any changes to the httpd.conf file, removing the package will not remove the httpd.conf file.

In order to figure out which one Apache is actually using, you need to find the actual httpd executable. This is probably either in /usr/sbin/ or /usr/local/apache2/bin/. If it is located in /usr/sbin/, then the /etc/httpd/conf/httpd.conf is probably the correct one. Otherwise, the /usr/local/aapache2/conf/httpd.conf file is probably the correct one.

Hopefully that wasn't too convoluted :)

Chad

backpacker

2:18 am on Dec 2, 2005 (gmt 0)

10+ Year Member



I got a lot of troubles when installing php-4.4.1 because of failing in loading php4.so into apache server.Now I know what caused that.Maybe.