In the Apache default configuration folder, there is a extra directory , which is used to store the configuration files for other Apache modules . These files are set up and provided by Apache for commonly used modules, they are loaded by the include directive , and if needed, only the "#" is removed before the corresponding load line in the httpd.conf file, and its comment is canceled.
Apache Extension configuration file Description:
filename |
Use
|
Httpd-autoindex.conf
|
Automatic indexing Configuration
|
Httpd-dav.conf
|
WebDAV configuration
|
Httpd-default.conf
|
Default configuration for Apache
|
Httpd-info.conf
|
Mod_status, mod_info module configuration
|
Httpd-languages.conf
|
Apache Multi-language configuration support
|
Httpd-manual.conf
|
Apache manuals available on the website
|
Httpd-mpm.conf
|
Multi-processing module configuration file
|
Httpd-multilang-errordoc.conf
|
Implementing multi-language error messages
|
Httpd-ssl.conf
|
SSL Configuration
|
Httpd-userdir.conf
|
Configure the User directory
|
Httpd-vhosts.conf
|
Virtual Host Configuration
|
For earlier httpd.conf files, when there is a large number of virtual hosts in a httpd.conf, the configuration of Ssl,web_dav, and then to find and modify will become very cumbersome, and using the include directive, The size of the httpd.conf file may be reduced to better read and write, for example, you can place the configuration of the virtual host in a single file and then load it with the include directive.
Include conf/extra/httpd-vhosts.conf
The include directive can load multiple files with wildcards , which are loaded alphabetically , and if you use the include directive to point to a directory, all files in that directory are loaded alphabetically. In addition to loading file paths, you can use absolute paths or relative paths relative to the ServerRoot directory . For example:
Include/home/apache/conf/httpd-vhosts.confinclude extra/httpd-vhosts.conf
For working habits, I recommend unifying all the profiles (Apache's extra directory is a good choice) and using relative paths to the ServerRoot directory.
Configuring Apache's httpd.conf (Server Extensions section)