From 4a6fe108636111bf0cc1f4f8ca4db75f67755a14 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Wed, 15 Apr 2015 16:15:15 -0600 Subject: [PATCH] Destroyed Caddyfile (markdown) --- Caddyfile.md | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 Caddyfile.md diff --git a/Caddyfile.md b/Caddyfile.md deleted file mode 100644 index 32ea83b..0000000 --- a/Caddyfile.md +++ /dev/null @@ -1,51 +0,0 @@ -The Caddyfile is how you configure Caddy. Generally you have one Caddyfile per website. - -By default, Caddy will look for the Caddyfile in the current directory, but you can specify any other path when you launch Caddy: - -``` -$ caddy -conf=/path/to/Caddyfile -``` - -And when you do that, the Caddyfile can have any filename, but we will call it the Caddyfile in the docs. - -## Structure - -The Caddyfile is very easy to use. It can configure either one or multiple servers (virtual hosts). - -The first line is always an address to listen on: - -``` -mydomain.com:80 -``` - -The rest of the file consists of lines with directives and parameters (arguments), for example: - -``` -mydomain.com:80 - -gzip -ext .html -``` - -To configure multiple servers (virtual hosts) in the same Caddyfile, wrap the directives pertaining for each server in a curly brace block, for example: - -``` -mydomain.com:80 { - redirect / :443 301 -} - -# Curly braces must open at the end of a line -mydomain.com:443 { - gzip - ext .html .htm - tls cert.pem key.pem -} -``` - -Notice that a `#` token turns the rest of the line into a comment. - -In the above file, the keywords `redirect`, `gzip`, `ext`, and `tls` are directives. There are others. Each directive is bound to a unique piece of middleware that wraps every request in order to satisfy the Caddyfile. - -To learn about what directives are available, please see the list of directives in this wiki. - -As you can tell, whitespace separates different arguments/parameters. You can group multiple words into a single argument by enclosing it "in quotes". \ No newline at end of file