Skip to content

Instantly share code, notes, and snippets.

@mpakus
Created July 9, 2020 15:30
Show Gist options
  • Save mpakus/bb244e889910c857d7cf4d7a14e32fae to your computer and use it in GitHub Desktop.
Save mpakus/bb244e889910c857d7cf4d7a14e32fae to your computer and use it in GitHub Desktop.
Caddyfile for Rails app
http://site.com http://www.site.com https://www.site.com {
redir https://site.com{uri}
}
https://site.com {
root * /var/www/site/current/public
log {
output file /var/www/site/shared/log/access.log {
roll_size 10MB
roll_keep 10
}
}
encode zstd gzip
file_server
@notStatic {
not file
}
reverse_proxy @notStatic unix//var/www/site/shared/tmp/sockets/puma.sock
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment