2.4 KiB
Virtual host templates
Table of Contents
- local
Overview
What is it?
vhost-gen templates are yaml files which contain a general definition for a virtual host definition. Those templates contain placeholders in the form of __<NAME>__
which will be replaced by settings applied to the Devilbox.
Template files
By default, vhost-gen templates are located within the Devilbox root directory under cfg/vhost-gen/
. The templates file names are suffixed with -example
and are absolutely identical to what is shipped inside each Devilbox web server Docker container.
host> tree -L 1 cfg/vhost-gen/
cfg/vhost-gen/
apache22.yml-example
├── apache24.yml-example
├── nginx.yml-example
├── README.md
└──
0 directories, 4 files
Note
Also note that nginx stable and nginx mainline share the same template as their configuration syntax is identical.
Template sections
All vhost-gen templates consist of three sections:
Section | Description |
---|---|
vhost |
This is the part that is actually rendered into the vhost configuration. All other sections will be inserted into this one. |
vhost_type |
The vhost type determines the type of vhost: reverse proxy or document root based vhost. The Devilbox currently does not support reverse proxy vhost. |
features |
The feature section contains many sub-sections that are replaced into the vhost section before final rendering. |
Templates
Apache 2.2 template
../../cfg/vhost-gen/apache22.yml-example
Apache 2.4 template
../../cfg/vhost-gen/apache24.yml-example
Nginx template
../../cfg/vhost-gen/nginx.yml-example