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.

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.