mirror of
https://github.com/caddyserver/website.git
synced 2025-04-24 14:06:17 -04:00
Initial commit
This commit is contained in:
commit
03b6fddeb0
77 changed files with 7599 additions and 0 deletions
35
src/docs/markdown/caddyfile.md
Normal file
35
src/docs/markdown/caddyfile.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
---
|
||||
title: The Caddyfile
|
||||
---
|
||||
|
||||
# The Caddyfile
|
||||
|
||||
The **Caddyfile** is a convenient Caddy configuration format for humans. It is most people's favorite way to use Caddy because it is easy to write, easy to understand, and expressive enough for most use cases.
|
||||
|
||||
It looks like this:
|
||||
|
||||
```
|
||||
example.com
|
||||
|
||||
root * /path/to/public_html
|
||||
try_files {path} /index.php?{query}&p={path}
|
||||
php_fastcgi unix//run/php/php-fpm.sock
|
||||
file_server
|
||||
```
|
||||
|
||||
(That's a real, production-ready Caddyfile that serves a Craft CMS site with fully-managed HTTPS.)
|
||||
|
||||
The basic idea is that you first type the address of your site, then the features or functionality you need your site to have.
|
||||
|
||||
## Menu
|
||||
|
||||
- #### [Quick start guide](/docs/quick-starts/caddyfile)
|
||||
- #### [List of directives](/docs/caddyfile/directives)
|
||||
- #### [Caddyfile concepts](/docs/caddyfile/concepts)
|
||||
- #### [Global options](/docs/caddyfile/options)
|
||||
<!-- - #### [Caddyfile specification](/docs/caddyfile/spec) TODO: Finish this -->
|
||||
|
||||
|
||||
## Note
|
||||
|
||||
The Caddyfile is just a [config adapter](/docs/config-adapters) for Caddy. It is usually preferred when manually crafting configurations by hand, but is not as expressive, flexible, or programmable as Caddy's [native JSON structure](/docs/json/). If you are automating your Caddy configurations/deployments, you may wish to use JSON with [Caddy's API](/docs/api). (You can actually use the Caddyfile with the API too, just to a limited extent.)
|
Loading…
Add table
Add a link
Reference in a new issue