3

This might be a dumb question, but anyway here it goes.

From the below link I could see that default config link for apache httpd2 is at "/usr/local/apache2/conf/httpd.conf" https://wiki.apache.org/httpd/DistrosDefaultLayout

how ever when I install httpd using yum on centos 6 and 7 config files seems to be at "/etc/httpd/conf/httpd.conf

Why doesn't yum install it to the location defined on the default distribution layout.

alda
  • 73
  • 1
  • 7
  • By default it should be in /etc/httpd (like in https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-centos-6 and other docs). Note that Apache can be installed in any directory you desire (used a lot while compiling your own). If you doubt where your install it, use the yum command to list the installed files (https://stackoverflow.com/questions/104055/how-to-list-the-contents-of-a-package-using-yum) – Nic3500 Dec 27 '17 at 02:42

3 Answers3

0

Default location primary httpd config file for Fedora Core, CentOS, RHEL is /etc/httpd/conf/httpd.conf

Giri
  • 141
  • 4
0

In general the path /usr/local is meant for "locally" installed packages. For a single computer that probably just means packages installed outside of the normal distribution. So I would argue a package manager like yum shouldn't even touch anything under /usr/local.

On the other hand it makes sense for the apache project to specify their default paths there, since if you download Apache directly from their site and install it you do it outside of your standard system distribution.

David Ongaro
  • 2,899
  • 1
  • 19
  • 34
0

Standard installation of Apache 2.4 on Ubuntu puts the apache2.conf file in /home/miro/etc/apache2. You can locate the main config file using:

/usr/sbin/apache2 -V | grep SERVER_CONFIG_FILE

Modify the path /usr/sbin/ to the location of the installation, if you have changed its default when installing.

Miro J.
  • 2,706
  • 3
  • 25
  • 40