

You can get a full list of the configuration files Apache currently has loaded, including the main configuration file and any Include files, by running the following command:Īpachectl -t -D DUMP_INCLUDES Accessing Apache Configurations in Control Panels

For example, a file named ‘php.conf’ within the /etc/apache2/conf.d/ would be considered an Include file by Apache, and its configurations would be loaded. conf at the end of their filename, as the * is a wildcard character.

The second line instructs Apache to read additional configurations from any files within the folder /etc/apache2/conf.d/ that have. The first line instructs Apache to read additional configurations from a specific file /etc/apache2/conf.d/includes/post_virtualhost_nf. Include "/etc/apache2/conf.d/includes/post_virtualhost_nf" The following are examples of how these Include files are referenced in the main configuration file: The Include files are additional configuration files that Apache will read if instructed to in the main configuration file. In addition to the main Apache configuration file discussed above, Apache settings can also be placed in the Apache Include files. The Apache configuration file’s relative path, listed as SERVER_CONFIG_FILE=”conf/nf“, is within the Apache installation’s root directory, making the full path to the Apache configuration file: To illustrate this using the example output above, the HTTPD_ROOT= line shows us the root directory of Apache is the following: The HTTPD_ROOT= line will display the root directory for Apache’s installation, and the SERVER_CONFIG_FILE= line will show you the Apache configuration file’s path relative to the root directory of Apache’s installation. D AP_TYPES_CONFIG_FILE="conf/mime.types" D DEFAULT_SCOREBOARD="logs/apache_runtime_status" D DEFAULT_PIDLOG="/var/run/apache2/httpd.pid" D APR_HAVE_IPV6 (IPv4-mapped addresses disabled) Httpd -V (if using an older version of Apache)Įither command displays Apache’s version and build ~]# apachectl -V If you have access to the server via command line, you can confirm the exact location that Apache is loading its configuration file from by running the command
APACHE DIRECTORY STUDIO FEDORA INSTALL
On a CentOS server, the package manager used to install the Apache web server (such as rpm, yum, or dnf) will typically default to placing the main Apache configuration file in of one of the following locations on the server:
