mirror of
https://github.com/caddyserver/caddy.git
synced 2025-08-11 09:16:26 -04:00
Reindent with spaces and less indentation for clarity, add "root" to show how to set site root
parent
b6db30c1a4
commit
8f4d2389ae
@ -21,7 +21,7 @@ Empty HTTP server (responds with empty responses):
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Static file server out of the current directory:
|
Static file server out of the specified directory:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
@ -33,7 +33,8 @@ Static file server out of the current directory:
|
|||||||
"routes": [
|
"routes": [
|
||||||
{
|
{
|
||||||
"respond": {
|
"respond": {
|
||||||
"responder": "file_server"
|
"responder": "file_server",
|
||||||
|
"root": "/var/www"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -61,7 +62,8 @@ Same as above, but with automatic HTTPS (including HTTP->HTTPS redirects):
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"respond": {
|
"respond": {
|
||||||
"responder": "file_server"
|
"responder": "file_server",
|
||||||
|
"root": "/var/www"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -70,6 +72,7 @@ Same as above, but with automatic HTTPS (including HTTP->HTTPS redirects):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
The reason the above config uses HTTPS is because the host matcher informs Caddy which hostnames to manage certificates for.
|
The reason the above config uses HTTPS is because the host matcher informs Caddy which hostnames to manage certificates for.
|
Loading…
x
Reference in New Issue
Block a user