diff --git a/Caddyfile b/Caddyfile index 3a9bea3..31352ee 100644 --- a/Caddyfile +++ b/Caddyfile @@ -1,3 +1,9 @@ emacssurvey.tecosaur.net -reverse_proxy localhost:8000 +@dynamic { + not path /css/* +} +reverse_proxy @dynamic localhost:8000 + +root /css/* /opt/emacs-survey/public/css/ +file_server /css/style.css diff --git a/setup.org b/setup.org index 226300c..198eec3 100644 --- a/setup.org +++ b/setup.org @@ -74,12 +74,20 @@ SETUPDIR=$(dirname "$(readlink --canonicalize-existing "$0")") ** Caddy Config We just need to redirect to Genie for now, which makes for a rather simple -config. +config. The only complication is serving the static files through Caddy not +Genie, for performance reasons (Genie recommends against serving static files +with it). #+begin_src prog :tangle Caddyfile emacssurvey.tecosaur.net -reverse_proxy localhost:8000 +@dynamic { + not path /css/* +} +reverse_proxy @dynamic localhost:8000 + +root /css/* /opt/emacs-survey/public/css/ +file_server /css/style.css #+end_src Just this one file is all it takes to get Caddy set up to our liking 🙂.