From 442fd748f6ef1215fb859d8aefe6c817988d189a Mon Sep 17 00:00:00 2001 From: Matthew Holt Date: Mon, 28 Oct 2019 15:08:45 -0600 Subject: caddyhttp: Minor cleanup and fix nil pointer deref in caddyfile adapter --- modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'modules/caddyhttp/reverseproxy/fastcgi') diff --git a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go index b7326af..ed97342 100644 --- a/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go +++ b/modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go @@ -82,12 +82,17 @@ func (t *Transport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { // // is equivalent to: // -// matcher indexFiles { +// matcher canonicalPath { // file { -// try_files {path} index.php +// try_files {path}/index.php +// } +// not { +// path */ // } // } -// rewrite match:indexFiles {http.matchers.file.relative} +// redir match:canonicalPath {path}/ 308 +// +// try_files {path} {path}/index.php index.php // // matcher phpFiles { // path *.php @@ -101,8 +106,8 @@ func (t *Transport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { // Thus, this directive produces multiple routes, each with a different // matcher because multiple consecutive routes are necessary to support // the common PHP use case. If this "common" config is not compatible -// with a user's PHP requirements, they can use the manual approach as -// above to configure it precisely as they need. +// with a user's PHP requirements, they can use a manual approach based +// on the example above to configure it precisely as they need. // // If a matcher is specified by the user, for example: // -- cgit v1.2.3