Переглянути джерело

Add configuration example for Caddy

boris1993 7 роки тому
батько
коміт
d4b40d8336
1 змінених файлів з 21 додано та 0 видалено
  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**
 * `footer` - optional page footer content (html allowed). default **null**
 * `lang` - language definition which should be used (available in the `i18n/` directory). default **en_US**
 * `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 ##
 ## Customization ##