To define a name for use in directives during Apache startup is an easy way to control the behavior of the webserver depending on your environment specifics.
This way you can have different configurations applied according to the context, facts you have or variables you set. It is possible to distinguish between production and development, detected facts, the hostname or a context string.
And you can have your apache config stored in a git repository which is used on two or more webservers to propagate changes easily between hosts.
These are the two use cases I want to look into:
- having several web servers (doing the same thing) but with different hardware
- having a development machine and one or more production machine(s) with a slightly different configuration
How would you do this?