docs: Minor updates to php_fastcgi docs (#71)

This commit is contained in:
Francis Lavoie 2020-08-05 16:03:20 -04:00 committed by GitHub
parent bc052dc87a
commit a9cba1e0c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,7 +21,7 @@ php_fastcgi [<matcher>] <php-fpm_gateways...> {
split <substrings...>
env [<key> <value>]
root <path>
index <filenames...>
index <filename>
<any other reverse_proxy subdirectives...>
}
@ -31,7 +31,7 @@ php_fastcgi [<matcher>] <php-fpm_gateways...> {
- **split** sets the substrings for splitting the URI into two parts. The first matching substring will be used to split the "path info" from the path. The first piece is suffixed with the matching substring and will be assumed as the actual resource (CGI script) name. The second piece will be set to PATH_INFO for the CGI script to use. Default: `.php`
- **env** sets an extra environment variable to the given value.
- **root** sets the root folder to the site. Default: [`root` directive](/docs/caddyfile/directives/root).
- **index** specifies the list of filenames to treat as directory index files. This affects the file matcher in the [expanded form](#expanded-form).
- **index** specifies the filename to treat as the directory index file. This affects the file matcher in the [expanded form](#expanded-form). Default: `index.php`
Since this directive is an opinionated wrapper over a reverse proxy, you can use any of reverse_proxy's subdirectives to customize it.
@ -94,9 +94,9 @@ When using php-fpm listening via a unix socket:
php_fastcgi unix//run/php/php7.4-fpm.sock
```
The [`root` directive](/docs/caddyfile/directives/root) is often used to specify the directory containing the PHP files:
The [`root` directive](/docs/caddyfile/directives/root) is often used to specify the directory containing the PHP scripts:
```caddy-d
root * /var/www/html
php_fastcgi 127.0.0.1:9000
```
```