IncludeFile is a position-independent config.txt/ezproxy.cfg directive that tells EZproxy to open the specified file and use it to configure EZproxy as though its contents were part of the main config.txt/ezproxy.cfg file. The additional files processed due to IncludeFile can contain any config.txt/ezproxy.cfg directives with the exception that they may not use IncludeFile, disallowing the inclusion of one file from another included file.
For those sites that use programs to generate their database definitions, IncludeFile provides a convenient way to intermix the general EZproxy configuration directives, database-specific directives, and generated directives. A sample config.txt/ezproxy.cfg might look like:
Title Some Database with special configuration need
Find NAME="_PRIORREFERER" VALUE="http://
Replace NAME="_PRIORREFERER" VALUE="http://^A
and the sample generated.cfg might look like:
Separating the hand-edited config.txt/ezproxy.cfg from the computer-produced generated.cfg reduces the chance of losing special configuration options and also simplifies overriding generated configuration with manually specified configuration, since the first database definition in config.txt/ezproxy.cfg or one of its included files defines the behavior for that database, overriding any similar entries that appear later in the configuration.
If you use the HAName and HAPeer directives to create High Availability configuration of EZproxy, the bulk of config.txt/ezproxy.cfg is identical on all servers. The only difference should be the Name directive and any Interface directives. To simplify maintenance, you can setup config.txt/ezproxy.cfg like this:
and have the specific.cfg contain system-specific lines such as:
With this setup, you can copy config.txt/ezproxy.cfg to all servers as you make changes without any need to modify the file for each server to changes its Name directive.