Include files in Apache HTTP Server Version 2.2 httpd.conf

apache-2.2httpd.conf

I have a large httpd.conf file, most of which is virtual hosts. Is there a way to make a file, say virtual_hosts.conf, and include it from httpd.conf? I've googled a bit, but can't seem to find much as far as includes, just module loading.

Best Answer

Information on apache httpd.conf files can be found at here.

Some snippets have been copied from this website to ensure that the information is not lost if the link would deprecated:

Include /usr/local/apache2/conf/ssl.conf
Include /usr/local/apache2/conf/vhosts/*.conf

Relative paths:

Include conf/ssl.conf
Include conf/vhosts/*.conf

Wildcards:

Include conf/vhosts/*/*.conf