I have a long and intricate list of
Another option instead of using Include
is using Macro
(so you can keep it all in one file).
First enable the macro module:
a2enmod macro
Then put your shared stuff in a macro and use
it from your virtualhosts:
ServerName example.com
ServerAdmin example@example.com
...
Use SharedStuff
Use SharedStuff
SSLEngine On
SSLProtocol All -SSLv2 -SSLv3
...
Macros can also take parameters, and be defined in other files that are included; so you can use them a bit like Functions, and save a lot of duplication across your Apache config files.
See here for more details:
https://httpd.apache.org/docs/2.4/mod/mod_macro.html