Apache virtual host configuration in multiple files

Virtualmin appears to be configured to keep all of the virtual hosts within the Apache httpd.conf. I would like to store each virtual hosts' configuration in a separate file in a subdirectory under the current Apache config location (e.g. /usr/local/etc/apache22/sites). It looks as this may be configurable in the module config page for Apache.

Can you please confirm which settings need to be changed and where to ensure this will work with Virtualmin?

Also, will Virtualmin automatically split the existing configuration file into individual files, or is this something that I will need to do manually?

Thanks.

Status: 
Closed (fixed)

Comments

This is fully supported ... what you need to do is :

  1. Create that sites directory.
  2. Add a line to httpd.conf like Include /usr/local/etc/apache22/sites/*
  3. Go to Webmin -> Servers -> Apache Webserver -> Module Config , and set "File or directory to add virtual servers to" to /usr/local/etc/apache22/sites

Existing domains will need to be manually moved to files in that directory though.

Automatically closed -- issue fixed for 2 weeks with no activity.