Reputation:
I'd like to use mod_vhost_alias for ease of site setup in Apache2.2. So I'd have my virtual host setup something like this:
<VirtualHost *:80>
VirtualDocumentRoot "/var/www/%0"
</VirtualHost>
What I'd also like to do on a per site basis, is to include an extra config file - something like this:
<VirtualHost *:80>
VirtualDocumentRoot "/var/www/%0"
Include "/var/www/%0/http.conf"
</VirtualHost>
But Apache doesn't seem to like this. Is there any other way of achieving this?
Thanks,
James.
Upvotes: 0
Views: 594
Reputation: 57658
You can do this the other way around: include a directory in your main configuration file, and have one configuration file for each site in there. E.g.
http.conf
Include /apache/sites/
/apache/sites/site1.conf
<VirtualHost *>
host specific configuration here..
</VirtualHost *>
Upvotes: 1