changelog shortlog graph tags branches files raw help

Mercurial > infra > home / changeset: add caddy

changeset 74: 68faf180fee2
parent 73: cd1c5559ddac
child 75: f4ebcb51191f
author: Richard Westhaver <ellis@rwest.io>
date: Sat, 27 Jul 2024 16:11:56 -0400
files: caddy.json
description: add caddy
     1.1--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2+++ b/caddy.json	Sat Jul 27 16:11:56 2024 -0400
     1.3@@ -0,0 +1,1371 @@
     1.4+{
     1.5+  "admin": {
     1.6+    "listen": ":2020"
     1.7+  },
     1.8+  "logging": {
     1.9+    "logs": {
    1.10+      "default": {
    1.11+        "exclude": [
    1.12+          "http.log.access.log0",
    1.13+          "http.log.access.log1",
    1.14+          "http.log.access.log2",
    1.15+          "http.log.access.log3"
    1.16+        ]
    1.17+      },
    1.18+      "log0": {
    1.19+        "writer": {
    1.20+          "filename": "/var/log/caddy/caddy.log",
    1.21+          "output": "file"
    1.22+        },
    1.23+        "encoder": {
    1.24+          "format": "json"
    1.25+        },
    1.26+        "include": [
    1.27+          "http.log.access.log0"
    1.28+        ]
    1.29+      },
    1.30+      "log1": {
    1.31+        "writer": {
    1.32+          "filename": "/var/log/caddy/caddy.log",
    1.33+          "output": "file"
    1.34+        },
    1.35+        "encoder": {
    1.36+          "format": "json"
    1.37+        },
    1.38+        "include": [
    1.39+          "http.log.access.log1"
    1.40+        ]
    1.41+      },
    1.42+      "log2": {
    1.43+        "writer": {
    1.44+          "filename": "/var/log/caddy/caddy.log",
    1.45+          "output": "file"
    1.46+        },
    1.47+        "encoder": {
    1.48+          "format": "json"
    1.49+        },
    1.50+        "include": [
    1.51+          "http.log.access.log2"
    1.52+        ]
    1.53+      },
    1.54+      "log3": {
    1.55+        "writer": {
    1.56+          "filename": "/var/log/caddy/caddy.log",
    1.57+          "output": "file"
    1.58+        },
    1.59+        "encoder": {
    1.60+          "format": "json"
    1.61+        },
    1.62+        "include": [
    1.63+          "http.log.access.log3"
    1.64+        ]
    1.65+      }
    1.66+    }
    1.67+  },
    1.68+  "apps": {
    1.69+    "http": {
    1.70+      "servers": {
    1.71+        "srv0": {
    1.72+          "listen": [
    1.73+            ":443"
    1.74+          ],
    1.75+          "enable_full_duplex": true,
    1.76+          "routes": [
    1.77+            {
    1.78+              "match": [
    1.79+                {
    1.80+                  "host": [
    1.81+                    "packy.compiler.company"
    1.82+                  ]
    1.83+                }
    1.84+              ],
    1.85+              "handle": [
    1.86+                {
    1.87+                  "handler": "subroute",
    1.88+                  "routes": [
    1.89+                    {
    1.90+                      "handle": [
    1.91+                        {
    1.92+                          "handler": "vars",
    1.93+                          "root": "/srv/http/packy.compiler.company"
    1.94+                        }
    1.95+                      ]
    1.96+                    },
    1.97+                    {
    1.98+                      "group": "group23",
    1.99+                      "handle": [
   1.100+                        {
   1.101+                          "handler": "subroute",
   1.102+                          "routes": [
   1.103+                            {
   1.104+                              "handle": [
   1.105+                                {
   1.106+                                  "handler": "headers",
   1.107+                                  "response": {
   1.108+                                    "deferred": true,
   1.109+                                    "set": {
   1.110+                                      "Access-Control-Allow-Headers": [
   1.111+                                        "*"
   1.112+                                      ],
   1.113+                                      "Access-Control-Allow-Methods": [
   1.114+                                        "GET, POST, PUT, PATCH, DELETE, OPTIONS"
   1.115+                                      ],
   1.116+                                      "Access-Control-Allow-Origin": [
   1.117+                                        "https://packy.compiler.company"
   1.118+                                      ],
   1.119+                                      "Access-Control-Max-Age": [
   1.120+                                        "3600"
   1.121+                                      ]
   1.122+                                    }
   1.123+                                  }
   1.124+                                },
   1.125+                                {
   1.126+                                  "handler": "static_response",
   1.127+                                  "status_code": 204
   1.128+                                }
   1.129+                              ]
   1.130+                            }
   1.131+                          ]
   1.132+                        }
   1.133+                      ],
   1.134+                      "match": [
   1.135+                        {
   1.136+                          "header": {
   1.137+                            "Origin": [
   1.138+                              "https://packy.compiler.company"
   1.139+                            ]
   1.140+                          },
   1.141+                          "method": [
   1.142+                            "OPTIONS"
   1.143+                          ]
   1.144+                        }
   1.145+                      ]
   1.146+                    },
   1.147+                    {
   1.148+                      "group": "group23",
   1.149+                      "handle": [
   1.150+                        {
   1.151+                          "handler": "subroute",
   1.152+                          "routes": [
   1.153+                            {
   1.154+                              "handle": [
   1.155+                                {
   1.156+                                  "handler": "headers",
   1.157+                                  "response": {
   1.158+                                    "deferred": true,
   1.159+                                    "set": {
   1.160+                                      "Access-Control-Allow-Origin": [
   1.161+                                        "{http.request.header.origin}"
   1.162+                                      ],
   1.163+                                      "Access-Control-Expose-Headers": [
   1.164+                                        "*"
   1.165+                                      ]
   1.166+                                    }
   1.167+                                  }
   1.168+                                }
   1.169+                              ]
   1.170+                            }
   1.171+                          ]
   1.172+                        }
   1.173+                      ],
   1.174+                      "match": [
   1.175+                        {
   1.176+                          "header": {
   1.177+                            "Origin": [
   1.178+                              "https://packy.compiler.company"
   1.179+                            ]
   1.180+                          },
   1.181+                          "not": [
   1.182+                            {
   1.183+                              "method": [
   1.184+                                "OPTIONS"
   1.185+                              ]
   1.186+                            }
   1.187+                          ]
   1.188+                        }
   1.189+                      ]
   1.190+                    },
   1.191+                    {
   1.192+                      "handle": [
   1.193+                        {
   1.194+                          "handler": "subroute",
   1.195+                          "routes": [
   1.196+                            {
   1.197+                              "handle": [
   1.198+                                {
   1.199+                                  "browse": {},
   1.200+                                  "handler": "file_server",
   1.201+                                  "hide": [
   1.202+                                    "/etc/caddy/Caddyfile"
   1.203+                                  ]
   1.204+                                }
   1.205+                              ],
   1.206+                              "match": [
   1.207+                                {
   1.208+                                  "method": [
   1.209+                                    "GET"
   1.210+                                  ]
   1.211+                                }
   1.212+                              ]
   1.213+                            },
   1.214+                            {
   1.215+                              "handle": [
   1.216+                                {
   1.217+                                  "handler": "webdav"
   1.218+                                }
   1.219+                              ]
   1.220+                            }
   1.221+                          ]
   1.222+                        }
   1.223+                      ]
   1.224+                    }
   1.225+                  ]
   1.226+                }
   1.227+              ],
   1.228+              "terminal": true
   1.229+            },
   1.230+            {
   1.231+              "match": [
   1.232+                {
   1.233+                  "host": [
   1.234+                    "demo.compiler.company"
   1.235+                  ]
   1.236+                }
   1.237+              ],
   1.238+              "handle": [
   1.239+                {
   1.240+                  "handler": "subroute",
   1.241+                  "routes": [
   1.242+                    {
   1.243+                      "handle": [
   1.244+                        {
   1.245+                          "handler": "vars",
   1.246+                          "root": "/srv/http/demo.compiler.company"
   1.247+                        }
   1.248+                      ]
   1.249+                    },
   1.250+                    {
   1.251+                      "group": "group25",
   1.252+                      "handle": [
   1.253+                        {
   1.254+                          "handler": "subroute",
   1.255+                          "routes": [
   1.256+                            {
   1.257+                              "handle": [
   1.258+                                {
   1.259+                                  "handler": "headers",
   1.260+                                  "response": {
   1.261+                                    "deferred": true,
   1.262+                                    "set": {
   1.263+                                      "Access-Control-Allow-Headers": [
   1.264+                                        "*"
   1.265+                                      ],
   1.266+                                      "Access-Control-Allow-Methods": [
   1.267+                                        "GET, POST, PUT, PATCH, DELETE, OPTIONS"
   1.268+                                      ],
   1.269+                                      "Access-Control-Allow-Origin": [
   1.270+                                        "https://cdn.compiler.company"
   1.271+                                      ],
   1.272+                                      "Access-Control-Max-Age": [
   1.273+                                        "3600"
   1.274+                                      ]
   1.275+                                    }
   1.276+                                  }
   1.277+                                },
   1.278+                                {
   1.279+                                  "handler": "static_response",
   1.280+                                  "status_code": 204
   1.281+                                }
   1.282+                              ]
   1.283+                            }
   1.284+                          ]
   1.285+                        }
   1.286+                      ],
   1.287+                      "match": [
   1.288+                        {
   1.289+                          "header": {
   1.290+                            "Origin": [
   1.291+                              "https://cdn.compiler.company"
   1.292+                            ]
   1.293+                          },
   1.294+                          "method": [
   1.295+                            "OPTIONS"
   1.296+                          ]
   1.297+                        }
   1.298+                      ]
   1.299+                    },
   1.300+                    {
   1.301+                      "group": "group25",
   1.302+                      "handle": [
   1.303+                        {
   1.304+                          "handler": "subroute",
   1.305+                          "routes": [
   1.306+                            {
   1.307+                              "handle": [
   1.308+                                {
   1.309+                                  "handler": "headers",
   1.310+                                  "response": {
   1.311+                                    "deferred": true,
   1.312+                                    "set": {
   1.313+                                      "Access-Control-Allow-Origin": [
   1.314+                                        "{http.request.header.origin}"
   1.315+                                      ],
   1.316+                                      "Access-Control-Expose-Headers": [
   1.317+                                        "*"
   1.318+                                      ]
   1.319+                                    }
   1.320+                                  }
   1.321+                                }
   1.322+                              ]
   1.323+                            }
   1.324+                          ]
   1.325+                        }
   1.326+                      ],
   1.327+                      "match": [
   1.328+                        {
   1.329+                          "header": {
   1.330+                            "Origin": [
   1.331+                              "https://cdn.compiler.company"
   1.332+                            ]
   1.333+                          },
   1.334+                          "not": [
   1.335+                            {
   1.336+                              "method": [
   1.337+                                "OPTIONS"
   1.338+                              ]
   1.339+                            }
   1.340+                          ]
   1.341+                        }
   1.342+                      ]
   1.343+                    }
   1.344+                  ]
   1.345+                }
   1.346+              ],
   1.347+              "terminal": true
   1.348+            },
   1.349+            {
   1.350+              "match": [
   1.351+                {
   1.352+                  "host": [
   1.353+                    "cdn.compiler.company"
   1.354+                  ]
   1.355+                }
   1.356+              ],
   1.357+              "handle": [
   1.358+                {
   1.359+                  "handler": "subroute",
   1.360+                  "routes": [
   1.361+                    {
   1.362+                      "handle": [
   1.363+                        {
   1.364+                          "handler": "vars",
   1.365+                          "root": "/srv/http/cdn.compiler.company"
   1.366+                        }
   1.367+                      ]
   1.368+                    },
   1.369+                    {
   1.370+                      "group": "group27",
   1.371+                      "handle": [
   1.372+                        {
   1.373+                          "handler": "subroute",
   1.374+                          "routes": [
   1.375+                            {
   1.376+                              "handle": [
   1.377+                                {
   1.378+                                  "handler": "headers",
   1.379+                                  "response": {
   1.380+                                    "deferred": true,
   1.381+                                    "set": {
   1.382+                                      "Access-Control-Allow-Headers": [
   1.383+                                        "*"
   1.384+                                      ],
   1.385+                                      "Access-Control-Allow-Methods": [
   1.386+                                        "GET, POST, PUT, PATCH, DELETE, OPTIONS"
   1.387+                                      ],
   1.388+                                      "Access-Control-Allow-Origin": [
   1.389+                                        "*"
   1.390+                                      ],
   1.391+                                      "Access-Control-Max-Age": [
   1.392+                                        "3600"
   1.393+                                      ]
   1.394+                                    }
   1.395+                                  }
   1.396+                                },
   1.397+                                {
   1.398+                                  "handler": "static_response",
   1.399+                                  "status_code": 204
   1.400+                                }
   1.401+                              ]
   1.402+                            }
   1.403+                          ]
   1.404+                        }
   1.405+                      ],
   1.406+                      "match": [
   1.407+                        {
   1.408+                          "header": {
   1.409+                            "Origin": [
   1.410+                              "*"
   1.411+                            ]
   1.412+                          },
   1.413+                          "method": [
   1.414+                            "OPTIONS"
   1.415+                          ]
   1.416+                        }
   1.417+                      ]
   1.418+                    },
   1.419+                    {
   1.420+                      "group": "group27",
   1.421+                      "handle": [
   1.422+                        {
   1.423+                          "handler": "subroute",
   1.424+                          "routes": [
   1.425+                            {
   1.426+                              "handle": [
   1.427+                                {
   1.428+                                  "handler": "headers",
   1.429+                                  "response": {
   1.430+                                    "deferred": true,
   1.431+                                    "set": {
   1.432+                                      "Access-Control-Allow-Origin": [
   1.433+                                        "{http.request.header.origin}"
   1.434+                                      ],
   1.435+                                      "Access-Control-Expose-Headers": [
   1.436+                                        "*"
   1.437+                                      ]
   1.438+                                    }
   1.439+                                  }
   1.440+                                }
   1.441+                              ]
   1.442+                            }
   1.443+                          ]
   1.444+                        }
   1.445+                      ],
   1.446+                      "match": [
   1.447+                        {
   1.448+                          "header": {
   1.449+                            "Origin": [
   1.450+                              "*"
   1.451+                            ]
   1.452+                          },
   1.453+                          "not": [
   1.454+                            {
   1.455+                              "method": [
   1.456+                                "OPTIONS"
   1.457+                              ]
   1.458+                            }
   1.459+                          ]
   1.460+                        }
   1.461+                      ]
   1.462+                    },
   1.463+                    {
   1.464+                      "handle": [
   1.465+                        {
   1.466+                          "handler": "subroute",
   1.467+                          "routes": [
   1.468+                            {
   1.469+                              "handle": [
   1.470+                                {
   1.471+                                  "browse": {},
   1.472+                                  "handler": "file_server",
   1.473+                                  "hide": [
   1.474+                                    "/etc/caddy/Caddyfile"
   1.475+                                  ]
   1.476+                                }
   1.477+                              ],
   1.478+                              "match": [
   1.479+                                {
   1.480+                                  "method": [
   1.481+                                    "GET"
   1.482+                                  ]
   1.483+                                }
   1.484+                              ]
   1.485+                            },
   1.486+                            {
   1.487+                              "handle": [
   1.488+                                {
   1.489+                                  "handler": "webdav"
   1.490+                                }
   1.491+                              ]
   1.492+                            }
   1.493+                          ]
   1.494+                        }
   1.495+                      ]
   1.496+                    }
   1.497+                  ]
   1.498+                }
   1.499+              ],
   1.500+              "terminal": true
   1.501+            },
   1.502+            {
   1.503+              "match": [
   1.504+                {
   1.505+                  "host": [
   1.506+                    "the.compiler.company"
   1.507+                  ]
   1.508+                }
   1.509+              ],
   1.510+              "handle": [
   1.511+                {
   1.512+                  "handler": "subroute",
   1.513+                  "routes": [
   1.514+                    {
   1.515+                      "handle": [
   1.516+                        {
   1.517+                          "handler": "vars",
   1.518+                          "root": "/srv/http/the.compiler.company"
   1.519+                        }
   1.520+                      ]
   1.521+                    },
   1.522+                    {
   1.523+                      "group": "group29",
   1.524+                      "handle": [
   1.525+                        {
   1.526+                          "handler": "subroute",
   1.527+                          "routes": [
   1.528+                            {
   1.529+                              "handle": [
   1.530+                                {
   1.531+                                  "handler": "headers",
   1.532+                                  "response": {
   1.533+                                    "deferred": true,
   1.534+                                    "set": {
   1.535+                                      "Access-Control-Allow-Headers": [
   1.536+                                        "*"
   1.537+                                      ],
   1.538+                                      "Access-Control-Allow-Methods": [
   1.539+                                        "GET, POST, PUT, PATCH, DELETE, OPTIONS"
   1.540+                                      ],
   1.541+                                      "Access-Control-Allow-Origin": [
   1.542+                                        "https://cdn.compiler.company"
   1.543+                                      ],
   1.544+                                      "Access-Control-Max-Age": [
   1.545+                                        "3600"
   1.546+                                      ]
   1.547+                                    }
   1.548+                                  }
   1.549+                                },
   1.550+                                {
   1.551+                                  "handler": "static_response",
   1.552+                                  "status_code": 204
   1.553+                                }
   1.554+                              ]
   1.555+                            }
   1.556+                          ]
   1.557+                        }
   1.558+                      ],
   1.559+                      "match": [
   1.560+                        {
   1.561+                          "header": {
   1.562+                            "Origin": [
   1.563+                              "https://cdn.compiler.company"
   1.564+                            ]
   1.565+                          },
   1.566+                          "method": [
   1.567+                            "OPTIONS"
   1.568+                          ]
   1.569+                        }
   1.570+                      ]
   1.571+                    },
   1.572+                    {
   1.573+                      "group": "group29",
   1.574+                      "handle": [
   1.575+                        {
   1.576+                          "handler": "subroute",
   1.577+                          "routes": [
   1.578+                            {
   1.579+                              "handle": [
   1.580+                                {
   1.581+                                  "handler": "headers",
   1.582+                                  "response": {
   1.583+                                    "deferred": true,
   1.584+                                    "set": {
   1.585+                                      "Access-Control-Allow-Origin": [
   1.586+                                        "{http.request.header.origin}"
   1.587+                                      ],
   1.588+                                      "Access-Control-Expose-Headers": [
   1.589+                                        "*"
   1.590+                                      ]
   1.591+                                    }
   1.592+                                  }
   1.593+                                }
   1.594+                              ]
   1.595+                            }
   1.596+                          ]
   1.597+                        }
   1.598+                      ],
   1.599+                      "match": [
   1.600+                        {
   1.601+                          "header": {
   1.602+                            "Origin": [
   1.603+                              "https://cdn.compiler.company"
   1.604+                            ]
   1.605+                          },
   1.606+                          "not": [
   1.607+                            {
   1.608+                              "method": [
   1.609+                                "OPTIONS"
   1.610+                              ]
   1.611+                            }
   1.612+                          ]
   1.613+                        }
   1.614+                      ]
   1.615+                    },
   1.616+                    {
   1.617+                      "group": "group29",
   1.618+                      "handle": [
   1.619+                        {
   1.620+                          "handler": "subroute",
   1.621+                          "routes": [
   1.622+                            {
   1.623+                              "handle": [
   1.624+                                {
   1.625+                                  "handler": "rewrite",
   1.626+                                  "uri": "{http.matchers.file.relative}"
   1.627+                                }
   1.628+                              ],
   1.629+                              "match": [
   1.630+                                {
   1.631+                                  "file": {
   1.632+                                    "try_files": [
   1.633+                                      "{http.request.uri.path}{http.request.uri.path}.html",
   1.634+                                      "{http.request.uri.path}/"
   1.635+                                    ]
   1.636+                                  }
   1.637+                                }
   1.638+                              ]
   1.639+                            },
   1.640+                            {
   1.641+                              "handle": [
   1.642+                                {
   1.643+                                  "handler": "file_server",
   1.644+                                  "hide": [
   1.645+                                    "/etc/caddy/Caddyfile"
   1.646+                                  ]
   1.647+                                }
   1.648+                              ]
   1.649+                            }
   1.650+                          ]
   1.651+                        }
   1.652+                      ]
   1.653+                    }
   1.654+                  ]
   1.655+                }
   1.656+              ],
   1.657+              "terminal": true
   1.658+            },
   1.659+            {
   1.660+              "match": [
   1.661+                {
   1.662+                  "host": [
   1.663+                    "hg.compiler.company"
   1.664+                  ]
   1.665+                }
   1.666+              ],
   1.667+              "handle": [
   1.668+                {
   1.669+                  "handler": "subroute",
   1.670+                  "routes": [
   1.671+                    {
   1.672+                      "group": "group31",
   1.673+                      "handle": [
   1.674+                        {
   1.675+                          "handler": "subroute",
   1.676+                          "routes": [
   1.677+                            {
   1.678+                              "handle": [
   1.679+                                {
   1.680+                                  "handler": "headers",
   1.681+                                  "response": {
   1.682+                                    "deferred": true,
   1.683+                                    "set": {
   1.684+                                      "Access-Control-Allow-Headers": [
   1.685+                                        "*"
   1.686+                                      ],
   1.687+                                      "Access-Control-Allow-Methods": [
   1.688+                                        "GET, POST, PUT, PATCH, DELETE, OPTIONS"
   1.689+                                      ],
   1.690+                                      "Access-Control-Allow-Origin": [
   1.691+                                        "https://packy.compiler.company"
   1.692+                                      ],
   1.693+                                      "Access-Control-Max-Age": [
   1.694+                                        "3600"
   1.695+                                      ]
   1.696+                                    }
   1.697+                                  }
   1.698+                                },
   1.699+                                {
   1.700+                                  "handler": "static_response",
   1.701+                                  "status_code": 204
   1.702+                                }
   1.703+                              ]
   1.704+                            }
   1.705+                          ]
   1.706+                        }
   1.707+                      ],
   1.708+                      "match": [
   1.709+                        {
   1.710+                          "header": {
   1.711+                            "Origin": [
   1.712+                              "https://packy.compiler.company"
   1.713+                            ]
   1.714+                          },
   1.715+                          "method": [
   1.716+                            "OPTIONS"
   1.717+                          ]
   1.718+                        }
   1.719+                      ]
   1.720+                    },
   1.721+                    {
   1.722+                      "group": "group31",
   1.723+                      "handle": [
   1.724+                        {
   1.725+                          "handler": "subroute",
   1.726+                          "routes": [
   1.727+                            {
   1.728+                              "handle": [
   1.729+                                {
   1.730+                                  "handler": "headers",
   1.731+                                  "response": {
   1.732+                                    "deferred": true,
   1.733+                                    "set": {
   1.734+                                      "Access-Control-Allow-Origin": [
   1.735+                                        "{http.request.header.origin}"
   1.736+                                      ],
   1.737+                                      "Access-Control-Expose-Headers": [
   1.738+                                        "*"
   1.739+                                      ]
   1.740+                                    }
   1.741+                                  }
   1.742+                                }
   1.743+                              ]
   1.744+                            }
   1.745+                          ]
   1.746+                        }
   1.747+                      ],
   1.748+                      "match": [
   1.749+                        {
   1.750+                          "header": {
   1.751+                            "Origin": [
   1.752+                              "https://packy.compiler.company"
   1.753+                            ]
   1.754+                          },
   1.755+                          "not": [
   1.756+                            {
   1.757+                              "method": [
   1.758+                                "OPTIONS"
   1.759+                              ]
   1.760+                            }
   1.761+                          ]
   1.762+                        }
   1.763+                      ]
   1.764+                    },
   1.765+                    {
   1.766+                      "group": "group31",
   1.767+                      "handle": [
   1.768+                        {
   1.769+                          "handler": "subroute",
   1.770+                          "routes": [
   1.771+                            {
   1.772+                              "handle": [
   1.773+                                {
   1.774+                                  "handler": "headers",
   1.775+                                  "response": {
   1.776+                                    "deferred": true,
   1.777+                                    "set": {
   1.778+                                      "Access-Control-Allow-Headers": [
   1.779+                                        "*"
   1.780+                                      ],
   1.781+                                      "Access-Control-Allow-Methods": [
   1.782+                                        "GET, POST, PUT, PATCH, DELETE, OPTIONS"
   1.783+                                      ],
   1.784+                                      "Access-Control-Allow-Origin": [
   1.785+                                        "https://cdn.compiler.company"
   1.786+                                      ],
   1.787+                                      "Access-Control-Max-Age": [
   1.788+                                        "3600"
   1.789+                                      ]
   1.790+                                    }
   1.791+                                  }
   1.792+                                },
   1.793+                                {
   1.794+                                  "handler": "static_response",
   1.795+                                  "status_code": 204
   1.796+                                }
   1.797+                              ]
   1.798+                            }
   1.799+                          ]
   1.800+                        }
   1.801+                      ],
   1.802+                      "match": [
   1.803+                        {
   1.804+                          "header": {
   1.805+                            "Origin": [
   1.806+                              "https://cdn.compiler.company"
   1.807+                            ]
   1.808+                          },
   1.809+                          "method": [
   1.810+                            "OPTIONS"
   1.811+                          ]
   1.812+                        }
   1.813+                      ]
   1.814+                    },
   1.815+                    {
   1.816+                      "group": "group31",
   1.817+                      "handle": [
   1.818+                        {
   1.819+                          "handler": "subroute",
   1.820+                          "routes": [
   1.821+                            {
   1.822+                              "handle": [
   1.823+                                {
   1.824+                                  "handler": "headers",
   1.825+                                  "response": {
   1.826+                                    "deferred": true,
   1.827+                                    "set": {
   1.828+                                      "Access-Control-Allow-Origin": [
   1.829+                                        "{http.request.header.origin}"
   1.830+                                      ],
   1.831+                                      "Access-Control-Expose-Headers": [
   1.832+                                        "*"
   1.833+                                      ]
   1.834+                                    }
   1.835+                                  }
   1.836+                                }
   1.837+                              ]
   1.838+                            }
   1.839+                          ]
   1.840+                        }
   1.841+                      ],
   1.842+                      "match": [
   1.843+                        {
   1.844+                          "header": {
   1.845+                            "Origin": [
   1.846+                              "https://cdn.compiler.company"
   1.847+                            ]
   1.848+                          },
   1.849+                          "not": [
   1.850+                            {
   1.851+                              "method": [
   1.852+                                "OPTIONS"
   1.853+                              ]
   1.854+                            }
   1.855+                          ]
   1.856+                        }
   1.857+                      ]
   1.858+                    },
   1.859+                    {
   1.860+                      "group": "group31",
   1.861+                      "handle": [
   1.862+                        {
   1.863+                          "handler": "subroute",
   1.864+                          "routes": [
   1.865+                            {
   1.866+                              "handle": [
   1.867+                                {
   1.868+                                  "handler": "headers",
   1.869+                                  "response": {
   1.870+                                    "deferred": true,
   1.871+                                    "set": {
   1.872+                                      "Access-Control-Allow-Headers": [
   1.873+                                        "*"
   1.874+                                      ],
   1.875+                                      "Access-Control-Allow-Methods": [
   1.876+                                        "GET, POST, PUT, PATCH, DELETE, OPTIONS"
   1.877+                                      ],
   1.878+                                      "Access-Control-Allow-Origin": [
   1.879+                                        "https://vc.compiler.company"
   1.880+                                      ],
   1.881+                                      "Access-Control-Max-Age": [
   1.882+                                        "3600"
   1.883+                                      ]
   1.884+                                    }
   1.885+                                  }
   1.886+                                },
   1.887+                                {
   1.888+                                  "handler": "static_response",
   1.889+                                  "status_code": 204
   1.890+                                }
   1.891+                              ]
   1.892+                            }
   1.893+                          ]
   1.894+                        }
   1.895+                      ],
   1.896+                      "match": [
   1.897+                        {
   1.898+                          "header": {
   1.899+                            "Origin": [
   1.900+                              "https://vc.compiler.company"
   1.901+                            ]
   1.902+                          },
   1.903+                          "method": [
   1.904+                            "OPTIONS"
   1.905+                          ]
   1.906+                        }
   1.907+                      ]
   1.908+                    },
   1.909+                    {
   1.910+                      "group": "group31",
   1.911+                      "handle": [
   1.912+                        {
   1.913+                          "handler": "subroute",
   1.914+                          "routes": [
   1.915+                            {
   1.916+                              "handle": [
   1.917+                                {
   1.918+                                  "handler": "headers",
   1.919+                                  "response": {
   1.920+                                    "deferred": true,
   1.921+                                    "set": {
   1.922+                                      "Access-Control-Allow-Origin": [
   1.923+                                        "{http.request.header.origin}"
   1.924+                                      ],
   1.925+                                      "Access-Control-Expose-Headers": [
   1.926+                                        "*"
   1.927+                                      ]
   1.928+                                    }
   1.929+                                  }
   1.930+                                }
   1.931+                              ]
   1.932+                            }
   1.933+                          ]
   1.934+                        }
   1.935+                      ],
   1.936+                      "match": [
   1.937+                        {
   1.938+                          "header": {
   1.939+                            "Origin": [
   1.940+                              "https://vc.compiler.company"
   1.941+                            ]
   1.942+                          },
   1.943+                          "not": [
   1.944+                            {
   1.945+                              "method": [
   1.946+                                "OPTIONS"
   1.947+                              ]
   1.948+                            }
   1.949+                          ]
   1.950+                        }
   1.951+                      ]
   1.952+                    },
   1.953+                    {
   1.954+                      "handle": [
   1.955+                        {
   1.956+                          "handler": "reverse_proxy",
   1.957+                          "upstreams": [
   1.958+                            {
   1.959+                              "dial": "rurik:8888"
   1.960+                            }
   1.961+                          ]
   1.962+                        }
   1.963+                      ]
   1.964+                    }
   1.965+                  ]
   1.966+                }
   1.967+              ],
   1.968+              "terminal": true
   1.969+            },
   1.970+            {
   1.971+              "match": [
   1.972+                {
   1.973+                  "host": [
   1.974+                    "compiler.company"
   1.975+                  ]
   1.976+                }
   1.977+              ],
   1.978+              "handle": [
   1.979+                {
   1.980+                  "handler": "subroute",
   1.981+                  "routes": [
   1.982+                    {
   1.983+                      "handle": [
   1.984+                        {
   1.985+                          "handler": "vars",
   1.986+                          "root": "/srv/http/compiler.company"
   1.987+                        }
   1.988+                      ]
   1.989+                    },
   1.990+                    {
   1.991+                      "group": "group33",
   1.992+                      "handle": [
   1.993+                        {
   1.994+                          "handler": "subroute",
   1.995+                          "routes": [
   1.996+                            {
   1.997+                              "handle": [
   1.998+                                {
   1.999+                                  "handler": "headers",
  1.1000+                                  "response": {
  1.1001+                                    "deferred": true,
  1.1002+                                    "set": {
  1.1003+                                      "Access-Control-Allow-Headers": [
  1.1004+                                        "*"
  1.1005+                                      ],
  1.1006+                                      "Access-Control-Allow-Methods": [
  1.1007+                                        "GET, POST, PUT, PATCH, DELETE, OPTIONS"
  1.1008+                                      ],
  1.1009+                                      "Access-Control-Allow-Origin": [
  1.1010+                                        "https://cdn.compiler.company"
  1.1011+                                      ],
  1.1012+                                      "Access-Control-Max-Age": [
  1.1013+                                        "3600"
  1.1014+                                      ]
  1.1015+                                    }
  1.1016+                                  }
  1.1017+                                },
  1.1018+                                {
  1.1019+                                  "handler": "static_response",
  1.1020+                                  "status_code": 204
  1.1021+                                }
  1.1022+                              ]
  1.1023+                            }
  1.1024+                          ]
  1.1025+                        }
  1.1026+                      ],
  1.1027+                      "match": [
  1.1028+                        {
  1.1029+                          "header": {
  1.1030+                            "Origin": [
  1.1031+                              "https://cdn.compiler.company"
  1.1032+                            ]
  1.1033+                          },
  1.1034+                          "method": [
  1.1035+                            "OPTIONS"
  1.1036+                          ]
  1.1037+                        }
  1.1038+                      ]
  1.1039+                    },
  1.1040+                    {
  1.1041+                      "group": "group33",
  1.1042+                      "handle": [
  1.1043+                        {
  1.1044+                          "handler": "subroute",
  1.1045+                          "routes": [
  1.1046+                            {
  1.1047+                              "handle": [
  1.1048+                                {
  1.1049+                                  "handler": "headers",
  1.1050+                                  "response": {
  1.1051+                                    "deferred": true,
  1.1052+                                    "set": {
  1.1053+                                      "Access-Control-Allow-Origin": [
  1.1054+                                        "{http.request.header.origin}"
  1.1055+                                      ],
  1.1056+                                      "Access-Control-Expose-Headers": [
  1.1057+                                        "*"
  1.1058+                                      ]
  1.1059+                                    }
  1.1060+                                  }
  1.1061+                                }
  1.1062+                              ]
  1.1063+                            }
  1.1064+                          ]
  1.1065+                        }
  1.1066+                      ],
  1.1067+                      "match": [
  1.1068+                        {
  1.1069+                          "header": {
  1.1070+                            "Origin": [
  1.1071+                              "https://cdn.compiler.company"
  1.1072+                            ]
  1.1073+                          },
  1.1074+                          "not": [
  1.1075+                            {
  1.1076+                              "method": [
  1.1077+                                "OPTIONS"
  1.1078+                              ]
  1.1079+                            }
  1.1080+                          ]
  1.1081+                        }
  1.1082+                      ]
  1.1083+                    },
  1.1084+                    {
  1.1085+                      "group": "group33",
  1.1086+                      "handle": [
  1.1087+                        {
  1.1088+                          "handler": "subroute",
  1.1089+                          "routes": [
  1.1090+                            {
  1.1091+                              "handle": [
  1.1092+                                {
  1.1093+                                  "handler": "rewrite",
  1.1094+                                  "uri": "{http.matchers.file.relative}"
  1.1095+                                }
  1.1096+                              ],
  1.1097+                              "match": [
  1.1098+                                {
  1.1099+                                  "file": {
  1.1100+                                    "try_files": [
  1.1101+                                      "{http.request.uri.path}",
  1.1102+                                      "{http.request.uri.path.html}",
  1.1103+                                      "{http.request.uri.path}/"
  1.1104+                                    ]
  1.1105+                                  }
  1.1106+                                }
  1.1107+                              ]
  1.1108+                            },
  1.1109+                            {
  1.1110+                              "handle": [
  1.1111+                                {
  1.1112+                                  "handler": "file_server",
  1.1113+                                  "hide": [
  1.1114+                                    "/etc/caddy/Caddyfile"
  1.1115+                                  ]
  1.1116+                                }
  1.1117+                              ]
  1.1118+                            }
  1.1119+                          ]
  1.1120+                        }
  1.1121+                      ]
  1.1122+                    }
  1.1123+                  ]
  1.1124+                }
  1.1125+              ],
  1.1126+              "terminal": true
  1.1127+            }
  1.1128+          ],
  1.1129+          "logs": {
  1.1130+            "logger_names": {
  1.1131+              "cdn.compiler.company": [
  1.1132+                "log0"
  1.1133+              ],
  1.1134+              "hg.compiler.company": [
  1.1135+                "log3"
  1.1136+              ],
  1.1137+              "packy.compiler.company": [
  1.1138+                "log2"
  1.1139+              ]
  1.1140+            },
  1.1141+            "skip_hosts": [
  1.1142+              "compiler.company",
  1.1143+              "demo.compiler.company",
  1.1144+              "the.compiler.company"
  1.1145+            ]
  1.1146+          }
  1.1147+        },
  1.1148+        "srv1": {
  1.1149+          "listen": [
  1.1150+            ":80"
  1.1151+          ],
  1.1152+          "enable_full_duplex": true,
  1.1153+          "routes": [
  1.1154+            {
  1.1155+              "handle": [
  1.1156+                {
  1.1157+                  "handler": "vars",
  1.1158+                  "root": "/srv/http/"
  1.1159+                },
  1.1160+                {
  1.1161+                  "browse": {},
  1.1162+                  "handler": "file_server",
  1.1163+                  "hide": [
  1.1164+                    "/etc/caddy/Caddyfile"
  1.1165+                  ]
  1.1166+                }
  1.1167+              ]
  1.1168+            }
  1.1169+          ]
  1.1170+        },
  1.1171+        "srv2": {
  1.1172+          "listen": [
  1.1173+            ":8080"
  1.1174+          ],
  1.1175+          "enable_full_duplex": true,
  1.1176+          "routes": [
  1.1177+            {
  1.1178+              "match": [
  1.1179+                {
  1.1180+                  "host": [
  1.1181+                    "rurik"
  1.1182+                  ]
  1.1183+                }
  1.1184+              ],
  1.1185+              "handle": [
  1.1186+                {
  1.1187+                  "handler": "subroute",
  1.1188+                  "routes": [
  1.1189+                    {
  1.1190+                      "handle": [
  1.1191+                        {
  1.1192+                          "handler": "vars",
  1.1193+                          "root": "/mnt/m"
  1.1194+                        }
  1.1195+                      ]
  1.1196+                    },
  1.1197+                    {
  1.1198+                      "group": "group36",
  1.1199+                      "handle": [
  1.1200+                        {
  1.1201+                          "handler": "subroute",
  1.1202+                          "routes": [
  1.1203+                            {
  1.1204+                              "handle": [
  1.1205+                                {
  1.1206+                                  "handler": "headers",
  1.1207+                                  "response": {
  1.1208+                                    "deferred": true,
  1.1209+                                    "set": {
  1.1210+                                      "Access-Control-Allow-Headers": [
  1.1211+                                        "*"
  1.1212+                                      ],
  1.1213+                                      "Access-Control-Allow-Methods": [
  1.1214+                                        "GET, POST, PUT, PATCH, DELETE, OPTIONS"
  1.1215+                                      ],
  1.1216+                                      "Access-Control-Allow-Origin": [
  1.1217+                                        "*"
  1.1218+                                      ],
  1.1219+                                      "Access-Control-Max-Age": [
  1.1220+                                        "3600"
  1.1221+                                      ]
  1.1222+                                    }
  1.1223+                                  }
  1.1224+                                },
  1.1225+                                {
  1.1226+                                  "handler": "static_response",
  1.1227+                                  "status_code": 204
  1.1228+                                }
  1.1229+                              ]
  1.1230+                            }
  1.1231+                          ]
  1.1232+                        }
  1.1233+                      ],
  1.1234+                      "match": [
  1.1235+                        {
  1.1236+                          "header": {
  1.1237+                            "Origin": [
  1.1238+                              "*"
  1.1239+                            ]
  1.1240+                          },
  1.1241+                          "method": [
  1.1242+                            "OPTIONS"
  1.1243+                          ]
  1.1244+                        }
  1.1245+                      ]
  1.1246+                    },
  1.1247+                    {
  1.1248+                      "group": "group36",
  1.1249+                      "handle": [
  1.1250+                        {
  1.1251+                          "handler": "subroute",
  1.1252+                          "routes": [
  1.1253+                            {
  1.1254+                              "handle": [
  1.1255+                                {
  1.1256+                                  "handler": "headers",
  1.1257+                                  "response": {
  1.1258+                                    "deferred": true,
  1.1259+                                    "set": {
  1.1260+                                      "Access-Control-Allow-Origin": [
  1.1261+                                        "{http.request.header.origin}"
  1.1262+                                      ],
  1.1263+                                      "Access-Control-Expose-Headers": [
  1.1264+                                        "*"
  1.1265+                                      ]
  1.1266+                                    }
  1.1267+                                  }
  1.1268+                                }
  1.1269+                              ]
  1.1270+                            }
  1.1271+                          ]
  1.1272+                        }
  1.1273+                      ],
  1.1274+                      "match": [
  1.1275+                        {
  1.1276+                          "header": {
  1.1277+                            "Origin": [
  1.1278+                              "*"
  1.1279+                            ]
  1.1280+                          },
  1.1281+                          "not": [
  1.1282+                            {
  1.1283+                              "method": [
  1.1284+                                "OPTIONS"
  1.1285+                              ]
  1.1286+                            }
  1.1287+                          ]
  1.1288+                        }
  1.1289+                      ]
  1.1290+                    },
  1.1291+                    {
  1.1292+                      "handle": [
  1.1293+                        {
  1.1294+                          "handler": "subroute",
  1.1295+                          "routes": [
  1.1296+                            {
  1.1297+                              "handle": [
  1.1298+                                {
  1.1299+                                  "browse": {},
  1.1300+                                  "handler": "file_server",
  1.1301+                                  "hide": [
  1.1302+                                    "/etc/caddy/Caddyfile"
  1.1303+                                  ]
  1.1304+                                }
  1.1305+                              ],
  1.1306+                              "match": [
  1.1307+                                {
  1.1308+                                  "method": [
  1.1309+                                    "GET"
  1.1310+                                  ]
  1.1311+                                }
  1.1312+                              ]
  1.1313+                            },
  1.1314+                            {
  1.1315+                              "handle": [
  1.1316+                                {
  1.1317+                                  "handler": "webdav"
  1.1318+                                }
  1.1319+                              ]
  1.1320+                            }
  1.1321+                          ]
  1.1322+                        }
  1.1323+                      ]
  1.1324+                    }
  1.1325+                  ]
  1.1326+                }
  1.1327+              ],
  1.1328+              "terminal": true
  1.1329+            }
  1.1330+          ],
  1.1331+          "automatic_https": {
  1.1332+            "skip": [
  1.1333+              "rurik"
  1.1334+            ]
  1.1335+          },
  1.1336+          "logs": {
  1.1337+            "logger_names": {
  1.1338+              "rurik": [
  1.1339+                "log1"
  1.1340+              ]
  1.1341+            }
  1.1342+          }
  1.1343+        }
  1.1344+      }
  1.1345+    },
  1.1346+    "tls": {
  1.1347+      "automation": {
  1.1348+        "policies": [
  1.1349+          {
  1.1350+            "subjects": [
  1.1351+              "packy.compiler.company",
  1.1352+              "demo.compiler.company",
  1.1353+              "cdn.compiler.company",
  1.1354+              "the.compiler.company",
  1.1355+              "hg.compiler.company",
  1.1356+              "compiler.company"
  1.1357+            ],
  1.1358+            "issuers": [
  1.1359+              {
  1.1360+                "email": "ellis@rwest.io",
  1.1361+                "module": "acme"
  1.1362+              },
  1.1363+              {
  1.1364+                "ca": "https://acme.zerossl.com/v2/DV90",
  1.1365+                "email": "ellis@rwest.io",
  1.1366+                "module": "acme"
  1.1367+              }
  1.1368+            ]
  1.1369+          }
  1.1370+        ]
  1.1371+      }
  1.1372+    }
  1.1373+  }
  1.1374+}