I've been on various different VPS servers and they sometimes automatically setup separate conf files for each virtual host.
I'm trying to achieve the same on my local machine (that runs Ubuntu 11.04 on xampp 1.7.3). How would you go about doing this. Would you edit the http.conf
file? Does apache already does this automatically?
How would one setup separate .conf files for each virtual host in a specified folder (say /opt/lampp/etc/extra/hosts
)?
You can include a directory of config files by adding a line like this to the bottom of your apache2.conf / httpd.conf file:
Where /opt/lampp/etc/extra/hosts/ would contain the conf files.
The conf files would each look like a normal virtual host definition:
(etc, etc)
That behavior is typical of a Debian installation where config files are split into smaller, more manageable files.