equal
deleted
inserted
replaced
|
1 { |
|
2 auto_https off |
|
3 debug |
|
4 admin off |
|
5 # log { |
|
6 # level DEBUG |
|
7 # output stdout |
|
8 # } |
|
9 } |
|
10 |
|
11 # enmi-conf.local { |
|
12 # root * /usr/share/caddy |
|
13 |
|
14 # php_fastcgi /wp/* fpm:9000 { |
|
15 # root /usr/share/caddy |
|
16 # } |
|
17 # file_server |
|
18 # file_server |
|
19 # } |
|
20 |
|
21 http://enmi-conf.local:8080 { |
|
22 root * /var/www/html |
|
23 header -Server |
|
24 |
|
25 @site_staticfiles { |
|
26 path_regexp site_files ^/wp/([^/]+)?(/wp-.*) |
|
27 } |
|
28 |
|
29 rewrite @site_staticfiles /wp{re.site_files.2} |
|
30 |
|
31 # rewrite { |
|
32 # regexp ^(/[^/]+)?(/wp-.*) |
|
33 # to {2} |
|
34 # } |
|
35 |
|
36 # rewrite { |
|
37 # regexp ^(/[^/]+)?(/.*\.php) |
|
38 # to {2} |
|
39 # } |
|
40 |
|
41 # rewrite { |
|
42 # if {path} not_match ^\/wp-admin |
|
43 # to {path} {path}/ /index.php?{query} |
|
44 # } |
|
45 try_files {path} {path}/index.php /wp/index.php |
|
46 |
|
47 php_fastcgi fpm:9000 { |
|
48 index off |
|
49 } |
|
50 |
|
51 file_server |
|
52 |
|
53 encode gzip |
|
54 |
|
55 |
|
56 @disallowed { |
|
57 path /wp/xmlrpc.php |
|
58 path *.sql |
|
59 path /wp/wp-content/uploads/*.php |
|
60 } |
|
61 |
|
62 rewrite @disallowed '/wp/index.php' |
|
63 |
|
64 } |
|
65 |