Skip to content

Instantly share code, notes, and snippets.

@iolloyd
Created May 19, 2016 17:23
Show Gist options
  • Save iolloyd/842b12049518ad26837ace58cfc389ab to your computer and use it in GitHub Desktop.
Save iolloyd/842b12049518ad26837ace58cfc389ab to your computer and use it in GitHub Desktop.
A configuration file for caddy to serve a php site through a front loader using index.php
///////////////////////////////////////////////
// This is all you need. Just add the following
// into a file called Caddyfile.
//
// Then just run `caddy`
//
// This example assumes ./public/index.php
///////////////////////////////////////////////
localhost:9999 {
root public
log access_log
errors error_log
fastcgi / 127.0.0.1:9000 php
rewrite / {
to {path} {path}/ /index.php?{query}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment