File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 22
33This setup allows you to serve ** custom error pages** in your Caddy server configuration using reusable ** snippets** for both:
44
5- - ** Upstream response errors** (e.g. Not found errors)
5+ - ** Upstream response errors** (e.g. Not Found errors)
66- ** General proxy/server errors** (e.g. Caddy-level issues)
77
88## 📁 Error Pages
9- Download the ZIP from [ README.md] ( ./README.md ) and extract all html files into /errors (or anyo ther directory)
9+ Download the ZIP file mentioned in README.md and extract all HTML files into /errors (or any other directory).
1010
1111## 📦 Snippets
12- Add the following two snippets at the top of your ` Caddyfile ` :
12+ Add the following two snippets near the top of your ` Caddyfile ` , before any site blocks :
1313
1414``` caddyfile
1515(upstream_error_handler) {
@@ -40,10 +40,10 @@ Add the following imports into your `handler` or `reverse_proxy` blocks
4040
4141``` caddyfile
4242example.com {
43- import proxy_error_handler # Handles errors caused by the proxy (e.g. includes 501)
43+ import proxy_error_handler # Handles errors caused by the proxy (e.g. 501)
4444
4545 reverse_proxy http://localhost:8080 {
46- import upstream_error_handler # Handles errors caused / returned from upstream
46+ import upstream_error_handler # Handles errors returned from the upstream server
4747 }
4848}
4949```
Original file line number Diff line number Diff line change 55---
66
77## 📁 Download
8- Download the latest bundle from GitHub Pages Branch: [ Download as ZIP] ( https://github.com/ToBiDi0410/error-pages/archive/refs/heads/gh-pages.zip )
8+ Download the latest bundle from the GitHub Pages Branch: [ Download ZIP] ( https://github.com/ToBiDi0410/error-pages/archive/refs/heads/gh-pages.zip )
99
1010
1111## 🛠 Usage
1212- [ How to use in Caddy] ( ./CADDY.md )
1313
1414## 🌐 Available Pages & Demo
15- Here's a list of all available error pages and their demo links:
15+ Below is a list of all available error pages with demo links:
1616
17- | Error Code | Page Name | Description | Demo Link | Custom Icon? |
18- | ---------- | ---------- | ------------------------------- | ---------------------------------------------------------------------- | ------------- |
17+ | Error Code | Page Name | Description | Demo Link | Custom Icon? |
18+ | ---------- | ---------- | ------------------------------- | ------------------------------------------------------------------ | ------------- |
1919| ` 400 ` | ` 400.html ` | Bad Request | [ Demo 400] ( https://tobidi0410.github.io/error-pages/http-400.html ) | ✅ |
2020| ` 401 ` | ` 401.html ` | Unauthorized | [ Demo 401] ( https://tobidi0410.github.io/error-pages/http-401.html ) | ✅ |
2121| ` 402 ` | ` 402.html ` | Payment Required | [ Demo 402] ( https://tobidi0410.github.io/error-pages/http-402.html ) | ✅ |
@@ -65,6 +65,7 @@ Here's a list of all available error pages and their demo links:
6565## 📝 License & Attribution
6666- [ Twemoji] ( https://github.com/twitter/twemoji ) — by Twitter — [ CC BY 4.0] ( https://creativecommons.org/licenses/by/4.0/ )
6767- [ Fluent System Icons] ( https://github.com/microsoft/fluentui-system-icons ) — by Microsoft — [ MIT] ( https://opensource.org/licenses/MIT )
68+ - [ Tailwind CSS] ( https://github.com/tailwindlabs/tailwindcss ) — by Tailwind Labs — [ MIT] ( https://opensource.org/licenses/MIT )
6869
6970## 🤖 AI Disclaimer
7071Some error descriptions, advice, and explanations in this repository are generated by artificial intelligence.
You can’t perform that action at this time.
0 commit comments