Update php_fastcgi docs

Matt Holt 2019-09-19 14:56:23 -06:00
parent 576399f66b
commit c83074ffec

@ -568,13 +568,19 @@ request_header [<matcher>] [[+|-]<field> [<value>]]
Proxies requests to one or more FastCGI backends specially configured for PHP apps. It has the same syntax and options as [reverse_proxy](#reverse_proxy), but is shorthand for a configuration equivalent to this example:
```
# internally rewrite URIs to match index.php files
# canonicalize URI trailing slash when index file present
matcher indexFiles {
not {
path */
}
file {
try_files {path} index.php
try_files {path}/index.php
}
}
rewrite match:indexFiles {http.matchers.file.relative}
redir match:indexFiles {path}/
# internally rewrite directory URIs to index.php files
try_files {path} {path}/index.php index.php
# proxy any requests for PHP files to backend via FastCGI
matcher phpFiles {
@ -587,7 +593,7 @@ reverse_proxy match:phpFiles php-fpm:9000 {
}
```
Thus, the following single line is sufficient and works for _most_ PHP scripts (replace php-fpm:9000 with your php-fpm listener):
Thus, the following single line is sufficient and works for _most_ PHP scripts (replace `php-fpm:9000` with your php-fpm listener):
```
php_fastcgi php-fpm:9000