Browse Source

Add configuration example for Caddy

boris1993 7 years ago
parent
commit
d4b40d8336
1 changed files with 21 additions and 0 deletions
  1. 21 0
      README.md

+ 21 - 0
README.md

@@ -228,6 +228,27 @@ Syntax: `Promise _httpErrorPages.koa([options:Object])`
 * `footer` - optional page footer content (html allowed). default **null**
 * `lang` - language definition which should be used (available in the `i18n/` directory). default **en_US**
 
+## Caddy Integration ##
+
+[Caddy](https://caddyserver.com/docs/errors) supports custom error-pages using `errors` directive. 
+
+File: Caddyfile
+
+Example - assumes HttpErrorPages are located into `/var/www/error`.
+
+```Caddyfile
+www.yoursite.com {
+    
+    // Other configurations
+
+    errors {
+        404 /var/www/error/HTTP404.html
+    }
+
+    // Other configurations
+
+}
+```
 
 ## Customization ##