├── 400.http
├── 401.http
├── 402.http
├── 403.http
├── 404.http
├── 405.http
├── 406.http
├── 407.http
├── 408.http
├── 409.http
├── 410.http
├── 411.http
├── 412.http
├── 413.http
├── 414.http
├── 415.http
├── 416.http
├── 417.http
├── 418.http
├── 421.http
├── 422.http
├── 423.http
├── 424.http
├── 425.http
├── 426.http
├── 428.http
├── 429.http
├── 431.http
├── 451.http
├── 500.http
├── 501.http
├── 502.http
├── 503.http
├── 504.http
├── 505.http
├── 506.http
├── 507.http
├── 508.http
├── 510.http
├── 511.http
├── LICENSE
├── PFSense.http
└── README.md
/400.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 400 Bad request
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 400 Bad request
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
400
21 |
Bad request
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/401.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 401 Unauthorized
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 401 Unauthorized
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
401
21 |
Unauthorized
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/402.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 402 Payment Required
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 402 Payment Required
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
402
21 |
Payment Required
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/403.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 403 Forbidden
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 403 Forbidden
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
403
21 |
Forbidden
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/404.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 404 Not Found
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 404 Not Found
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
404
21 |
Not Found
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/405.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 405 Method Not Allowed
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 405 Method Not Allowed
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
405
21 |
Method Not Allowed
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/406.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 406 Not Acceptable
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 406 Not Acceptable
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
406
21 |
Not Acceptable
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/409.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 409 Conflict
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 409 Conflict
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
409
21 |
Conflict
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/410.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 410 Gone
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 410 Gone
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/411.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 411 Length Required
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 411 Length Required
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
411
21 |
Length Required
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/412.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 412 Precondition Failed
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 412 Precondition Failed
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
412
21 |
Precondition Failed
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/413.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 413 Content Too Large
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 413 Content Too Large
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
413
21 |
Content Too Large
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/414.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 414 URI Too Long
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 414 URI Too Long
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
414
21 |
URI Too Long
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/417.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 417 Expectation Failed
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 417 Expectation Failed
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
417
21 |
Expectation Failed
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/418.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 418 I'm a teapot
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 418 I'm a teapot
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
418
21 |
I'm a teapot
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/421.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 421 Misdirected Request
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 421 Misdirected Request
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
421
21 |
Misdirected Request
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/423.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 423 Locked
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 423 Locked
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
423
21 |
Locked
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/424.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 424 Failed Dependency
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 424 Failed Dependency
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
424
21 |
Failed Dependency
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/425.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 425 Too Early
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 425 Too Early
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
425
21 |
Too Early
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/426.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 426 Upgrade Required
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 426 Upgrade Required
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
426
21 |
Upgrade Required
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/429.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 429 Too Many Requests
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 429 Too Many Requests
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
429
21 |
Too Many Requests
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/501.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 501 Not Implemented
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 501 Not Implemented
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
501
21 |
Not Implemented
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/502.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 502 Bad Gateway
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 502 Bad Gateway
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
502
21 |
Bad Gateway
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/508.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 508 Loop Detected
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 508 Loop Detected
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
508
21 |
Loop Detected
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/510.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 510 Not Extended
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | 510 Not Extended
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
510
21 |
Not Extended
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/PFSense.http:
--------------------------------------------------------------------------------
1 | HTTP/1.0 {errorcode} {errormsg}
2 | Cache-Control: no-cache
3 | Connection: close
4 | Content-Type: text/html
5 |
6 |
7 |
8 |
9 |
10 | {errorcode} {errormsg}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
{errorcode}
21 |
{errormsg}
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 
2 |
3 | # Haproxy Custom Errors
4 | Custom http error pages for HAProxy
5 |
6 | # Error Code Definitions
7 | In the [RFC 9110](https://httpwg.org/specs/rfc9110.html#status.codes) is every http status code presented with a deep and great description but for the most of us a short description is more than enough for the short version check the great work of [Mozzila.org](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status)
8 |
9 | # Installation
10 | Edit your `haproxy.cfg` config file
11 | ```bash
12 | # Add this rows to "defaults" or "backend" section
13 | errorfile 400 /etc/haproxy/errors-custom/400.http
14 | errorfile 401 /etc/haproxy/errors-custom/401.http
15 | errorfile 402 /etc/haproxy/errors-custom/402.http
16 | errorfile 403 /etc/haproxy/errors-custom/403.http
17 | errorfile 404 /etc/haproxy/errors-custom/404.http
18 | errorfile 405 /etc/haproxy/errors-custom/405.http
19 | errorfile 406 /etc/haproxy/errors-custom/406.http
20 | errorfile 407 /etc/haproxy/errors-custom/407.http
21 | errorfile 408 /etc/haproxy/errors-custom/408.http
22 | errorfile 409 /etc/haproxy/errors-custom/409.http
23 | errorfile 410 /etc/haproxy/errors-custom/410.http
24 | errorfile 411 /etc/haproxy/errors-custom/411.http
25 | errorfile 412 /etc/haproxy/errors-custom/412.http
26 | errorfile 413 /etc/haproxy/errors-custom/413.http
27 | errorfile 414 /etc/haproxy/errors-custom/414.http
28 | errorfile 415 /etc/haproxy/errors-custom/415.http
29 | errorfile 416 /etc/haproxy/errors-custom/416.http
30 | errorfile 417 /etc/haproxy/errors-custom/417.http
31 | errorfile 418 /etc/haproxy/errors-custom/418.http
32 | errorfile 421 /etc/haproxy/errors-custom/421.http
33 | errorfile 422 /etc/haproxy/errors-custom/422.http
34 | errorfile 423 /etc/haproxy/errors-custom/423.http
35 | errorfile 424 /etc/haproxy/errors-custom/424.http
36 | errorfile 425 /etc/haproxy/errors-custom/425.http
37 | errorfile 426 /etc/haproxy/errors-custom/426.http
38 | errorfile 428 /etc/haproxy/errors-custom/428.http
39 | errorfile 429 /etc/haproxy/errors-custom/429.http
40 | errorfile 431 /etc/haproxy/errors-custom/431.http
41 | errorfile 451 /etc/haproxy/errors-custom/451.http
42 | errorfile 500 /etc/haproxy/errors-custom/500.http
43 | errorfile 501 /etc/haproxy/errors-custom/501.http
44 | errorfile 502 /etc/haproxy/errors-custom/502.http
45 | errorfile 503 /etc/haproxy/errors-custom/503.http
46 | errorfile 504 /etc/haproxy/errors-custom/504.http
47 | errorfile 505 /etc/haproxy/errors-custom/505.http
48 | errorfile 506 /etc/haproxy/errors-custom/506.http
49 | errorfile 507 /etc/haproxy/errors-custom/507.http
50 | errorfile 508 /etc/haproxy/errors-custom/508.http
51 | errorfile 510 /etc/haproxy/errors-custom/510.http
52 | errorfile 511 /etc/haproxy/errors-custom/511.http
53 | ```
54 | # Installation PFSense
55 | 1. Open your HAProxy configration page
56 | 2. Open the tab `FILES`
57 | 3. Add a new entry
58 | 4. name it `ErrorPFSense`
59 | 5. Paste the contents of `PFSense.http`
60 | 6. Hit Save
61 | 7. Go to your `Frondend` and open the fontend that you want to change
62 | 8. Scroll down to `Error files` and add all the error codes you want to support with `ErrorPFSense` as the error page
63 | 9. Hit Save
64 | 10. Apply Changes
65 |
--------------------------------------------------------------------------------