Serve static files with Caddy
This commit is contained in:
parent
77bffc8c84
commit
abd49debb7
|
@ -1,3 +1,9 @@
|
||||||
emacssurvey.tecosaur.net
|
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
|
||||||
|
|
12
setup.org
12
setup.org
|
@ -74,12 +74,20 @@ SETUPDIR=$(dirname "$(readlink --canonicalize-existing "$0")")
|
||||||
** Caddy Config
|
** Caddy Config
|
||||||
|
|
||||||
We just need to redirect to Genie for now, which makes for a rather simple
|
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
|
#+begin_src prog :tangle Caddyfile
|
||||||
emacssurvey.tecosaur.net
|
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
|
#+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 🙂.
|
||||||
|
|
Loading…
Reference in New Issue