The conf.d Directory
Files in the
/etc/httpd/conf.d (Redhat / Fedora) or the
/etc/apache*/conf.d (Debian / Ubuntu) directory are read and automatically appended to the configuration in the httpd.conf file every time Apache is restarted. In complicated configurations, in which a Web server has to host many Web sites, you can create one configuration file per Web site each with its own set of <VirtualHost> and <Directory> containers. This can make Web site management much simpler. To do this correctly:
- Backup your
httpd.conffile, in case you make a mistake.
- Create the files located in this directory that contain the Apache required <VirtualHost> and <Directory> containers and directives.
- If each site has a dedicated IP address, then place the NameVirtualHost statements in the corresponding
conf.ddirectory file. If it is shared, it'll need to remain in the main httpd.conf file.
- Remove the corresponding directives from the
- Restart Apache, and test.
The files located in the
conf.d directory don't have to have any special names, and you don't have to refer to them in the