Skip to content

Instantly share code, notes, and snippets.

@dwin
Created March 15, 2017 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwin/ae0844318c33d90499bf4d589e35b61a to your computer and use it in GitHub Desktop.
Save dwin/ae0844318c33d90499bf4d589e35b61a to your computer and use it in GitHub Desktop.
Caddy Server configuration file
# Standard HTML site using Git plugin with Github.com
website.com {
tls email@website.com
gzip
root /srv/website.com/public
ext .html .htm
git {
repo git@github.com:dddd/Amber.git
key /srv/website.com/.ssh/id_rsa
hook /webhook github_idkey # set github request type to json
}
errors {
log /srv/website.com/error.log
404 404.html
}
log /srv/website.com/access.log {
rotate {
size 20 # Rotate at 20MB
age 16 # Keep logs for 16 days
keep 15 # Keep up to 15 logs
}
}
}
# Proxy site
test.website.com {
tls email@website.com
gzip
proxy / 172.17.0.1:8088 {
header_upstream Host {host}
header_upstream X-Real-IP {remote}
header_upstream X-Forwarded-Proto {scheme}
}
log /srv/httptest.website.com/access.log {
rotate {
size 20 # Rotate at 20MB
age 16 # Keep logs for 16 days
keep 15 # Keep up to 15 logs
}
}
errors {
log /srv/httptest.website.com/error.log
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment