[add] add custom error page if upstream fails

This commit is contained in:
2020-06-06 18:13:13 -04:00
parent 9378ae4a00
commit 55823e6cfa
22 changed files with 625 additions and 3 deletions

View File

@@ -18,6 +18,18 @@ http {
# set larger name bucket for large domain names
server_names_hash_bucket_size 64;
map $status $status_category {
"~^(?<code>(?<prefix>(?<category>[1-5])[0-9])[0-9])$" "$category";
}
map $status $status_prefix {
"~^(?<code>(?<prefix>(?<category>[1-5])[0-9])[0-9])$" "$prefix";
}
map $server_name $server_domain {
"~(?<domain_name>[a-zA-Z0-9-]*)(\.[a-z]*)$" "$domain_name";
}
server {
listen 8080 default_server;