Discussion:
Includes in VirtualHost files?
(too old to reply)
Mike
2012-12-16 18:29:25 UTC
Permalink
Is there a way to use includes in name-based virtualhost.conf files? Each VirtualHost configuration is nearly identical, the differences are the name of the site, directories, etc.

Every time I make a change to the configuration, I write a script to apply this change to all the virtual host files. Is there a way to make the change in one (included) file, rather that change all the conf files?

Thanks!

Mike
BobMCT
2012-12-16 21:41:56 UTC
Permalink
Post by Mike
Is there a way to use includes in name-based virtualhost.conf files? Each VirtualHost configuration is nearly identical, the differences are the name of the site, directories, etc.
Every time I make a change to the configuration, I write a script to apply this change to all the virtual host files. Is there a way to make the change in one (included) file, rather that change all the conf files?
Thanks!
Mike
Why don't you try relocating all the "common" sections, those that are
identical to each virtual host, to the beginning of the config file
NOT relative to any host. That will define them as "global" and will
be used for ALL virtual hosts thereafter.

Hope this helps.

Continue reading on narkive:
Loading...