0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00
caddy/caddytest/integration/caddyfile_adapt/php_fastcgi_matcher.txt
Francis Lavoie 3cfefeb0f7
httpcaddyfile: Configure servers via global options (#3836)
* httpcaddyfile: First pass at implementing server options

* httpcaddyfile: Add listener wrapper support

* httpcaddyfile: Sort sbaddrs to make adapt output more deterministic

* httpcaddyfile: Add server options adapt tests

* httpcaddyfile: Windows line endings lol

* caddytest: More windows line endings lol (sorry Matt)

* Update caddyconfig/httpcaddyfile/serveroptions.go

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>

* httpcaddyfile: Reword listener address "matcher"

* Apply suggestions from code review

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>

* httpcaddyfile: Deprecate experimental_http3 option (moved to servers)

* httpcaddyfile: Remove validation step, no longer needed

Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
2020-11-23 12:46:50 -07:00

2 KiB

:8884

@api host example.com php_fastcgi @api localhost:9000

{ "apps": { "http": { "servers": { "srv0": { "listen": [ ":8884" ], "routes": [ { "match": [ { "host": [ "example.com" ] } ], "handle": [ { "handler": "subroute", "routes": [ { "handle": [ { "handler": "static_response", "headers": { "Location": [ "{http.request.uri.path}/" ] }, "status_code": 308 } ], "match": [ { "file": { "try_files": [ "{http.request.uri.path}/index.php" ] }, "not": [ { "path": [ "/" ] } ] } ] }, { "handle": [ { "handler": "rewrite", "uri": "{http.matchers.file.relative}" } ], "match": [ { "file": { "split_path": [ ".php" ], "try_files": [ "{http.request.uri.path}", "{http.request.uri.path}/index.php", "index.php" ] } } ] }, { "handle": [ { "handler": "reverse_proxy", "transport": { "protocol": "fastcgi", "split_path": [ ".php" ] }, "upstreams": [ { "dial": "localhost:9000" } ] } ], "match": [ { "path": [ ".php" ] } ] } ] } ] } ] } } } } }