Debian Codegraph @

caddytest/integration/caddyfile_adapt/php_fastcgi_try_files_override_no_dir_index.caddyfiletest

raw
1 :8884
2
3 php_fastcgi localhost:9000 {
4 # some php_fastcgi-specific subdirectives
5 split .php .php5
6 env VAR1 value1
7 env VAR2 value2
8 root /var/www
9 try_files {path} index.php
10 dial_timeout 3s
11 read_timeout 10s
12 write_timeout 20s
13
14 # passed through to reverse_proxy (directive order doesn't matter!)
15 lb_policy random
16 }
17 ----------
18 {
19 "apps": {
20 "http": {
21 "servers": {
22 "srv0": {
23 "listen": [
24 ":8884"
25 ],
26 "routes": [
27 {
28 "match": [
29 {
30 "file": {
31 "try_files": [
32 "{http.request.uri.path}",
33 "index.php"
34 ],
35 "try_policy": "first_exist_fallback",
36 "split_path": [
37 ".php",
38 ".php5"
39 ]
40 }
41 }
42 ],
43 "handle": [
44 {
45 "handler": "rewrite",
46 "uri": "{http.matchers.file.relative}"
47 }
48 ]
49 },
50 {
51 "match": [
52 {
53 "path": [
54 "*.php",
55 "*.php5"
56 ]
57 }
58 ],
59 "handle": [
60 {
61 "handler": "reverse_proxy",
62 "load_balancing": {
63 "selection_policy": {
64 "policy": "random"
65 }
66 },
67 "transport": {
68 "dial_timeout": 3000000000,
69 "env": {
70 "VAR1": "value1",
71 "VAR2": "value2"
72 },
73 "protocol": "fastcgi",
74 "read_timeout": 10000000000,
75 "root": "/var/www",
76 "split_path": [
77 ".php",
78 ".php5"
79 ],
80 "write_timeout": 20000000000
81 },
82 "upstreams": [
83 {
84 "dial": "localhost:9000"
85 }
86 ]
87 }
88 ]
89 }
90 ]
91 }
92 }
93 }
94 }
95 }