Add HTTP error redirection to CADDY
This commit is contained in:
parent
66eac8831b
commit
5bf5186599
|
@ -9,3 +9,10 @@ reverse_proxy @dynamic localhost:8000
|
||||||
|
|
||||||
root * /opt/emacs-survey/public
|
root * /opt/emacs-survey/public
|
||||||
file_server
|
file_server
|
||||||
|
|
||||||
|
handle_errors {
|
||||||
|
rewrite * /{err.status_code}
|
||||||
|
reverse_proxy https://http.cat {
|
||||||
|
header_up Host {upstream_hostport}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
11
setup.org
11
setup.org
|
@ -99,6 +99,17 @@ root * /opt/emacs-survey/public
|
||||||
file_server
|
file_server
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
For HTTP errors we could re-use the Genie error pages ... or have some fun 🐱.
|
||||||
|
|
||||||
|
#+begin_src prog
|
||||||
|
handle_errors {
|
||||||
|
rewrite * /{err.status_code}
|
||||||
|
reverse_proxy https://http.cat {
|
||||||
|
header_up Host {upstream_hostport}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#+end_src
|
||||||
|
|
||||||
Just this one file is all it takes to get Caddy set up to our liking 🙂.
|
Just this one file is all it takes to get Caddy set up to our liking 🙂.
|
||||||
|
|
||||||
#+begin_src sh
|
#+begin_src sh
|
||||||
|
|
Loading…
Reference in New Issue