httpd configuration

The httpd.conf directory differs across Linux & Unix variants like CentOS, Mac OS X, Red Hat, Ubuntu and XAMPP Mac.
 
This lists the httpd.conf location for each operating system:
 
CentOS 5.2:  
/etc/httpd/conf/httpd.conf
 
CentOS 5.3:  
/etc/httpd/conf/httpd.conf
 
Mac OSX 10.6 Snow Leopard:  
/etc/apache2/httpd.conf
 
Mac OSX 10.7 Lion:  
/etc/apache2/httpd.conf
 
Red Hat Enterprise Linux Server 5.6 Tikanga (RHEL):  
/etc/httpd/conf/httpd.conf
 
Ubuntu 7.04 Feisty Fawn: 
/etc/apache2/httpd.conf
 
Ubuntu 8.10 Intrepid Ibex: 
/etc/apache2/httpd.conf
 
Ubuntu 10.10 Maverick Meerkat: 
/etc/apache2/httpd.conf
 
XAMPP on Mac: 
/Applications/XAMPP/etc/httpd.conf
 
If your operating system or Apache version is not mentioned above, you can use the find command on Linux, Unix or Mac via SSH/Terminal to find httpd.conf.
 
find / -name httpd.conf 2>/dev/null

If you aren’t using packages to install Apache and perhaps compiled it from source instead or otherwise installed to a custom location, we can easily run find over the entire file system to find these files.

root@centos7 ~]# find / -name httpd.conf
/etc/httpd/conf/httpd.conf
/usr/lib/tmpfiles.d/httpd.conf

The above example will search through the root of the file system ‘/’ and find every file named ‘httpd.conf’.

or

The options we will use with the RPM command are -q to query a package, and -c which will list the configuration files that are part of the package. As shown below we have run RPM with the -qc options on the httpd package, which is where Apache comes from in CentOS.

example
[root@centos7 ~]# rpm -qc httpd
/etc/httpd/conf.d/autoindex.conf
/etc/httpd/conf.d/userdir.conf
/etc/httpd/conf.d/welcome.conf
/etc/httpd/conf.modules.d/00-base.conf
/etc/httpd/conf.modules.d/00-dav.conf
/etc/httpd/conf.modules.d/00-lua.conf
/etc/httpd/conf.modules.d/00-mpm.conf
/etc/httpd/conf.modules.d/00-proxy.conf
/etc/httpd/conf.modules.d/00-systemd.conf
/etc/httpd/conf.modules.d/01-cgi.conf
/etc/httpd/conf/httpd.conf
/etc/httpd/conf/magic
/etc/logrotate.d/httpd
/etc/sysconfig/htcacheclean
/etc/sysconfig/httpd

These are all of the default configuration files that are installed by the httpd package.

The primary Apache configuration file is /etc/httpd/conf/httpd.conf, most of the changes to Apache will be made here.


* Don’t forget that if you edit any of the Apache configuration files you will need to reload your apache server.

  • httpd configuration
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

IP class

For dedicated server owners.Each IP you order is class 4 Failover and are switchable between your...

Geolocated IP addresse

You have created sites with an international focus and are keen to work on SEO for your target...

The keyword cannibalization

Keyword cannibalization means that you have various blog posts or articles on your site that can...

Editing files using VI

VI is a Linux text editor that can edit most of the files under a Linux architecture (text files,...

Dedicated Server Info manual

This manual is to be used to make all administrators more sensitive regarding few topics related...