From 8702b5154e64b20d6a8e5435122deae7e2020ef9 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Wed, 21 Jan 2015 19:45:31 -0700 Subject: [PATCH] Updated Caddyfile (markdown) --- Caddyfile.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Caddyfile.md b/Caddyfile.md index 14a7964..32ea83b 100644 --- a/Caddyfile.md +++ b/Caddyfile.md @@ -34,9 +34,8 @@ mydomain.com:80 { redirect / :443 301 } -# Curly braces can be on their own line if you prefer -mydomain.com:443 -{ +# Curly braces must open at the end of a line +mydomain.com:443 { gzip ext .html .htm tls cert.pem key.pem @@ -49,6 +48,4 @@ In the above file, the keywords `redirect`, `gzip`, `ext`, and `tls` are directi 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". - -For those who want to check their understanding: the file above serves `mydomain.com` on ports 80 and 443 (the HTTP and HTTPS ports). All requests to port 80 are redirected to 443, the secure port, with a 301 status code. All requests to port 443 are gzipped. Then, if an extension was not added to the URL, the .html extension will be internally added if the resource exists (and if not, it tries .htm). In other words, it serves clean, extensionless URLs by inferring the file extension. The tls line enables TLS using the certificate and key files listed. \ No newline at end of file +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