|
@@ -81,6 +81,41 @@ Configuration keys:
|
81
|
81
|
- letsencryptDir: The root directory used by letsencrypt (certbot)
|
82
|
82
|
- certDir: Where to put symlink to certificate files
|
83
|
83
|
|
|
84
|
+Hooks
|
|
85
|
+-----
|
|
86
|
+
|
|
87
|
+There's two types of hooks:
|
|
88
|
+ - Certificate: Cert hooks are triggered when creating a site using the --site-create flag. Hooks are executed once per site, before and after creation.
|
|
89
|
+ - Site: Site hooks are triggered when requesting/renewing a certificate using the flags --cert-request and --cert-renew. Hooks are executed once per certificate, before and after request/renew.
|
|
90
|
+
|
|
91
|
+Hooks must be enabled/disabled using `--hook-enable` and `--hook-disable` arguments.
|
|
92
|
+
|
|
93
|
+Some hooks are provided:
|
|
94
|
+ - Certificates
|
|
95
|
+ - 000-print: Print request/renewal details, before request/renewal.
|
|
96
|
+ - 100-mkwebroot: make directory for the letsencrypt challenge, to be used with `extra/apache/sitegen.conf`, before request/renewal.
|
|
97
|
+ - 200-reload: Reload apache daemon, after request/renewal.
|
|
98
|
+ - Sites
|
|
99
|
+ - 000-print: Print site details, before site creation.
|
|
100
|
+ - 100-sitegen-cert-request: Request a letsencrypt certificate if SSL is detected in site configuration files, after site creation.
|
|
101
|
+ - 200-chown: Change owner of the document root to the user running the command, after site creation.
|
|
102
|
+ - 300-a2ensite: Enable site in apache, after site creation.
|
|
103
|
+ - 400-reload: Reload apache daemon, after site creation.
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+Templates
|
|
107
|
+---------
|
|
108
|
+
|
|
109
|
+Templates are used to generate apache site configuration. They are split in two files:
|
|
110
|
+ - Transport configuration (*.conf): These files setup the http and/or https configuration to be used.
|
|
111
|
+ - Site configuration (*.include): These files setup the site configuration, as document root, server name, aliases, location, etc. They are included ine the .conf files using Include directive.
|
|
112
|
+
|
|
113
|
+Default templates are default.include and https.conf. Templates can be specified when creating site by using the following syntax:
|
|
114
|
+```
|
|
115
|
+sitegen --site-create www.example.com:docker.rhttps
|
|
116
|
+```
|
|
117
|
+Where `www.example.com` is the site to create, `docker` is the `docker.include` template and `rhttps` is the `rhttps.conf` template.
|
|
118
|
+
|
84
|
119
|
Usage
|
85
|
120
|
-----
|
86
|
121
|
|