diff --git a/Caddyfile-Directives.md b/Caddyfile-Directives.md index 6c9a8bb..2a0cf5d 100644 --- a/Caddyfile-Directives.md +++ b/Caddyfile-Directives.md @@ -32,9 +32,18 @@ gzip ``` +#### fastcgi + +Forwards requests to a FastCGI server. This allows you to serve PHP websites with php-fpm, though it is not limited to that. The first argument should be the base path to match, and the second argument is the address that the FastCGI server (like php-fpm) is listening on. Multiple fastcgi forwarding rules can be created (you can use this directive multiple times). + +``` +fastcgi /app 127.0.0.1:9000 +``` + + #### header -Adds header(s) of the specified name and value to the responses of requests matching the request path. You can specify a single header and value on a line or group them under the same path with curly braces. +Adds header(s) of the specified name and value to the responses of requests matching the request path. You can specify a single header and value on a line or group them under the same path with curly braces. You can use this directive multiple times. ``` header /one X-Some-Header 1 @@ -46,7 +55,7 @@ header /multiple { #### import -Import acts like "include" in other languages/syntaxes. It replaces that line with the contents of another file. Useful for reusing common settings. +Import acts like "include" in other languages/syntaxes. It replaces that line with the contents of another file. Useful for reusing common settings. You can use this directive multiple times. ``` import shared.conf @@ -55,7 +64,7 @@ import shared.conf #### log -Activates logging. Right now, only requests can be logged. You may optionally specify an output file and format. +Activates logging. Right now, only requests can be logged. You may optionally specify an output file and format. You can use this directive multiple times. ``` log requests /var/log/access.log "Got a request: {method} {path}" @@ -81,7 +90,7 @@ The following variables are available when specifying the format: #### redirect -HTTP redirect with the given status code. +HTTP redirect with the given status code. You can use this directive multiple times. ``` redirect /from /to 302 @@ -90,7 +99,7 @@ redirect /from /to 302 #### rewrite -Internally rewrites a request from one path to another. +Internally rewrites a request from one path to another. You can use this directive multiple times. ``` rewrite /from /to