docs: Add Caddyfile syntax highlighting (#41)

This commit is contained in:
Francis Lavoie 2020-05-17 16:32:12 -04:00 committed by GitHub
parent 75fcfc21bb
commit e0f5ee1bb9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 215 additions and 179 deletions

View file

@ -8,7 +8,7 @@ Create a new text file named `Caddyfile` (no extension).
The first thing to type in a Caddyfile is your site's address:
```
```caddy
localhost
```
@ -18,7 +18,7 @@ localhost
Then hit enter and type what you want it to do, so it looks like this:
```
```caddy
localhost
respond "Hello, world!"
@ -43,7 +43,7 @@ Hello, world!</code></pre>
You can define multiple sites in a Caddyfile by wrapping them in curly braces `{ }`. Change your Caddyfile to be:
```
```caddy
localhost {
respond "Hello, world!"
}

View file

@ -40,7 +40,7 @@ This is the most common way to get HTTPS.
Create a file called `Caddyfile` (no extension) where the first line is your domain name, for example:
```
```caddy
example.com
respond "Hello, privacy!"

View file

@ -36,7 +36,7 @@ Then make a request to [localhost](https://localhost) (or whatever address you s
In the current working directory, create a file called `Caddyfile` with these contents:
```
```caddy
localhost
reverse_proxy 127.0.0.1:9000
@ -50,7 +50,7 @@ You can then make a request to [https://localhost](https://localhost) to see it
It's easy to change the proxy's address:
```
```caddy
:2016
reverse_proxy 127.0.0.1:9000

View file

@ -41,7 +41,7 @@ You can use another folder as the site root:
In the root of your site, create a file called `Caddyfile` with these contents:
```
```caddy
localhost
file_server
@ -59,7 +59,7 @@ The [`file_server` directive](/docs/caddyfile/directives/file_server) has more o
If you don't have an index file but you want to display a file listing, use the `browse` argument:
```
```caddy
localhost
file_server browse
@ -67,7 +67,7 @@ file_server browse
You can also use another folder as the site root:
```
```caddy
localhost
root * /home/me/mysite