Skip to content

Instantly share code, notes, and snippets.

@brejoc
Last active August 29, 2017 02:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brejoc/b19090eee8d9d0aa076a0d031ae3694a to your computer and use it in GitHub Desktop.
Save brejoc/b19090eee8d9d0aa076a0d031ae3694a to your computer and use it in GitHub Desktop.
# Caddyfile
localhost:8001 {
gzip
errors visible
log stderr
rewrite /static {
r (.*)
to /path/to/static/{1}
}
rewrite /media {
r (.*)
to /path/to/media/{1}
}
proxy / localhost:8000 {
header_upstream Host {host}
header_upstream X-Forwarded-Proto {scheme}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment