diff options
Diffstat (limited to 'caddytest/integration/caddyfile_adapt/php_fastcgi_expanded_form.txt')
-rw-r--r-- | caddytest/integration/caddyfile_adapt/php_fastcgi_expanded_form.txt | 262 |
1 files changed, 131 insertions, 131 deletions
diff --git a/caddytest/integration/caddyfile_adapt/php_fastcgi_expanded_form.txt b/caddytest/integration/caddyfile_adapt/php_fastcgi_expanded_form.txt index d453128..bb7c7f7 100644 --- a/caddytest/integration/caddyfile_adapt/php_fastcgi_expanded_form.txt +++ b/caddytest/integration/caddyfile_adapt/php_fastcgi_expanded_form.txt @@ -1,132 +1,132 @@ -:8886
-
-route {
- # Add trailing slash for directory requests
- @canonicalPath {
- file {
- try_files {path}/index.php
- }
- not path */
- }
- redir @canonicalPath {path}/ 308
-
- # If the requested file does not exist, try index files
- @indexFiles {
- file {
- try_files {path} {path}/index.php index.php
- split_path .php
- }
- }
- rewrite @indexFiles {http.matchers.file.relative}
-
- # Proxy PHP files to the FastCGI responder
- @phpFiles {
- path *.php
- }
- reverse_proxy @phpFiles 127.0.0.1:9000 {
- transport fastcgi {
- split .php
- }
- }
-}
-----------
-{
- "apps": {
- "http": {
- "servers": {
- "srv0": {
- "listen": [
- ":8886"
- ],
- "routes": [
- {
- "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": "127.0.0.1:9000"
- }
- ]
- }
- ],
- "match": [
- {
- "path": [
- "*.php"
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- ]
- }
- }
- }
- }
+:8886 + +route { + # Add trailing slash for directory requests + @canonicalPath { + file { + try_files {path}/index.php + } + not path */ + } + redir @canonicalPath {path}/ 308 + + # If the requested file does not exist, try index files + @indexFiles { + file { + try_files {path} {path}/index.php index.php + split_path .php + } + } + rewrite @indexFiles {http.matchers.file.relative} + + # Proxy PHP files to the FastCGI responder + @phpFiles { + path *.php + } + reverse_proxy @phpFiles 127.0.0.1:9000 { + transport fastcgi { + split .php + } + } +} +---------- +{ + "apps": { + "http": { + "servers": { + "srv0": { + "listen": [ + ":8886" + ], + "routes": [ + { + "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": "127.0.0.1:9000" + } + ] + } + ], + "match": [ + { + "path": [ + "*.php" + ] + } + ] + } + ] + } + ] + } + ] + } + } + } + } }
\ No newline at end of file |