changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > infra > home / caddy.json

changeset 78: 55c2ee64e843
parent: d9f9e108c36c
child: c499610c1d89
author: Richard Westhaver <ellis@rwest.io>
date: Sun, 28 Jul 2024 19:04:41 -0400
permissions: -rw-r--r--
description: caddy
1 {
2  "admin": {
3  "listen": ":2020"
4  },
5  "apps": {
6  "http": {
7  "servers": {
8  "srv0": {
9  "listen": [
10  ":8080"
11  ],
12  "enable_full_duplex": true,
13  "routes": [
14  {
15  "match": [
16  {
17  "host": [
18  "packy.compiler.company"
19  ]
20  }
21  ],
22  "handle": [
23  {
24  "handler": "subroute",
25  "routes": [
26  {
27  "handle": [
28  {
29  "handler": "vars",
30  "root": "/home/web/www/packy.compiler.company"
31  }
32  ]
33  },
34  {
35  "group": "group23",
36  "handle": [
37  {
38  "handler": "subroute",
39  "routes": [
40  {
41  "handle": [
42  {
43  "handler": "headers",
44  "response": {
45  "deferred": true,
46  "set": {
47  "Access-Control-Allow-Headers": [
48  "*"
49  ],
50  "Access-Control-Allow-Methods": [
51  "GET, POST, PUT, PATCH, DELETE, OPTIONS"
52  ],
53  "Access-Control-Allow-Origin": [
54  "https://packy.compiler.company"
55  ],
56  "Access-Control-Max-Age": [
57  "3600"
58  ]
59  }
60  }
61  },
62  {
63  "handler": "static_response",
64  "status_code": 204
65  }
66  ]
67  }
68  ]
69  }
70  ],
71  "match": [
72  {
73  "header": {
74  "Origin": [
75  "https://packy.compiler.company"
76  ]
77  },
78  "method": [
79  "OPTIONS"
80  ]
81  }
82  ]
83  },
84  {
85  "group": "group23",
86  "handle": [
87  {
88  "handler": "subroute",
89  "routes": [
90  {
91  "handle": [
92  {
93  "handler": "headers",
94  "response": {
95  "deferred": true,
96  "set": {
97  "Access-Control-Allow-Origin": [
98  "{http.request.header.origin}"
99  ],
100  "Access-Control-Expose-Headers": [
101  "*"
102  ]
103  }
104  }
105  }
106  ]
107  }
108  ]
109  }
110  ],
111  "match": [
112  {
113  "header": {
114  "Origin": [
115  "https://packy.compiler.company"
116  ]
117  },
118  "not": [
119  {
120  "method": [
121  "OPTIONS"
122  ]
123  }
124  ]
125  }
126  ]
127  },
128  {
129  "handle": [
130  {
131  "handler": "subroute",
132  "routes": [
133  {
134  "handle": [
135  {
136  "browse": {},
137  "handler": "file_server",
138  "hide": [
139  "/etc/caddy/Caddyfile"
140  ]
141  }
142  ],
143  "match": [
144  {
145  "method": [
146  "GET"
147  ]
148  }
149  ]
150  },
151  {
152  "handle": [
153  {
154  "handler": "webdav"
155  }
156  ]
157  }
158  ]
159  }
160  ]
161  }
162  ]
163  }
164  ],
165  "terminal": true
166  },
167  {
168  "match": [
169  {
170  "host": [
171  "demo.compiler.company"
172  ]
173  }
174  ],
175  "handle": [
176  {
177  "handler": "subroute",
178  "routes": [
179  {
180  "handle": [
181  {
182  "handler": "vars",
183  "root": "/home/web/www/demo.compiler.company"
184  }
185  ]
186  },
187  {
188  "group": "group25",
189  "handle": [
190  {
191  "handler": "subroute",
192  "routes": [
193  {
194  "handle": [
195  {
196  "handler": "headers",
197  "response": {
198  "deferred": true,
199  "set": {
200  "Access-Control-Allow-Headers": [
201  "*"
202  ],
203  "Access-Control-Allow-Methods": [
204  "GET, POST, PUT, PATCH, DELETE, OPTIONS"
205  ],
206  "Access-Control-Allow-Origin": [
207  "https://cdn.compiler.company"
208  ],
209  "Access-Control-Max-Age": [
210  "3600"
211  ]
212  }
213  }
214  },
215  {
216  "handler": "static_response",
217  "status_code": 204
218  }
219  ]
220  }
221  ]
222  }
223  ],
224  "match": [
225  {
226  "header": {
227  "Origin": [
228  "https://cdn.compiler.company"
229  ]
230  },
231  "method": [
232  "OPTIONS"
233  ]
234  }
235  ]
236  },
237  {
238  "group": "group25",
239  "handle": [
240  {
241  "handler": "subroute",
242  "routes": [
243  {
244  "handle": [
245  {
246  "handler": "headers",
247  "response": {
248  "deferred": true,
249  "set": {
250  "Access-Control-Allow-Origin": [
251  "{http.request.header.origin}"
252  ],
253  "Access-Control-Expose-Headers": [
254  "*"
255  ]
256  }
257  }
258  }
259  ]
260  }
261  ]
262  }
263  ],
264  "match": [
265  {
266  "header": {
267  "Origin": [
268  "https://cdn.compiler.company"
269  ]
270  },
271  "not": [
272  {
273  "method": [
274  "OPTIONS"
275  ]
276  }
277  ]
278  }
279  ]
280  }
281  ]
282  }
283  ],
284  "terminal": true
285  },
286  {
287  "match": [
288  {
289  "host": [
290  "cdn.compiler.company"
291  ]
292  }
293  ],
294  "handle": [
295  {
296  "handler": "subroute",
297  "routes": [
298  {
299  "handle": [
300  {
301  "handler": "vars",
302  "root": "/home/web/www/cdn.compiler.company"
303  }
304  ]
305  },
306  {
307  "group": "group27",
308  "handle": [
309  {
310  "handler": "subroute",
311  "routes": [
312  {
313  "handle": [
314  {
315  "handler": "headers",
316  "response": {
317  "deferred": true,
318  "set": {
319  "Access-Control-Allow-Headers": [
320  "*"
321  ],
322  "Access-Control-Allow-Methods": [
323  "GET, POST, PUT, PATCH, DELETE, OPTIONS"
324  ],
325  "Access-Control-Allow-Origin": [
326  "*"
327  ],
328  "Access-Control-Max-Age": [
329  "3600"
330  ]
331  }
332  }
333  },
334  {
335  "handler": "static_response",
336  "status_code": 204
337  }
338  ]
339  }
340  ]
341  }
342  ],
343  "match": [
344  {
345  "header": {
346  "Origin": [
347  "*"
348  ]
349  },
350  "method": [
351  "OPTIONS"
352  ]
353  }
354  ]
355  },
356  {
357  "group": "group27",
358  "handle": [
359  {
360  "handler": "subroute",
361  "routes": [
362  {
363  "handle": [
364  {
365  "handler": "headers",
366  "response": {
367  "deferred": true,
368  "set": {
369  "Access-Control-Allow-Origin": [
370  "{http.request.header.origin}"
371  ],
372  "Access-Control-Expose-Headers": [
373  "*"
374  ]
375  }
376  }
377  }
378  ]
379  }
380  ]
381  }
382  ],
383  "match": [
384  {
385  "header": {
386  "Origin": [
387  "*"
388  ]
389  },
390  "not": [
391  {
392  "method": [
393  "OPTIONS"
394  ]
395  }
396  ]
397  }
398  ]
399  },
400  {
401  "handle": [
402  {
403  "handler": "subroute",
404  "routes": [
405  {
406  "handle": [
407  {
408  "browse": {},
409  "handler": "file_server",
410  "hide": [
411  "/etc/caddy/Caddyfile"
412  ]
413  }
414  ],
415  "match": [
416  {
417  "method": [
418  "GET"
419  ]
420  }
421  ]
422  },
423  {
424  "handle": [
425  {
426  "handler": "webdav"
427  }
428  ]
429  }
430  ]
431  }
432  ]
433  }
434  ]
435  }
436  ],
437  "terminal": true
438  },
439  {
440  "match": [
441  {
442  "host": [
443  "the.compiler.company"
444  ]
445  }
446  ],
447  "handle": [
448  {
449  "handler": "subroute",
450  "routes": [
451  {
452  "handle": [
453  {
454  "handler": "vars",
455  "root": "/home/web/www/the.compiler.company"
456  }
457  ]
458  },
459  {
460  "group": "group29",
461  "handle": [
462  {
463  "handler": "subroute",
464  "routes": [
465  {
466  "handle": [
467  {
468  "handler": "headers",
469  "response": {
470  "deferred": true,
471  "set": {
472  "Access-Control-Allow-Headers": [
473  "*"
474  ],
475  "Access-Control-Allow-Methods": [
476  "GET, POST, PUT, PATCH, DELETE, OPTIONS"
477  ],
478  "Access-Control-Allow-Origin": [
479  "https://cdn.compiler.company"
480  ],
481  "Access-Control-Max-Age": [
482  "3600"
483  ]
484  }
485  }
486  },
487  {
488  "handler": "static_response",
489  "status_code": 204
490  }
491  ]
492  }
493  ]
494  }
495  ],
496  "match": [
497  {
498  "header": {
499  "Origin": [
500  "https://cdn.compiler.company"
501  ]
502  },
503  "method": [
504  "OPTIONS"
505  ]
506  }
507  ]
508  },
509  {
510  "group": "group29",
511  "handle": [
512  {
513  "handler": "subroute",
514  "routes": [
515  {
516  "handle": [
517  {
518  "handler": "headers",
519  "response": {
520  "deferred": true,
521  "set": {
522  "Access-Control-Allow-Origin": [
523  "{http.request.header.origin}"
524  ],
525  "Access-Control-Expose-Headers": [
526  "*"
527  ]
528  }
529  }
530  }
531  ]
532  }
533  ]
534  }
535  ],
536  "match": [
537  {
538  "header": {
539  "Origin": [
540  "https://cdn.compiler.company"
541  ]
542  },
543  "not": [
544  {
545  "method": [
546  "OPTIONS"
547  ]
548  }
549  ]
550  }
551  ]
552  },
553  {
554  "group": "group29",
555  "handle": [
556  {
557  "handler": "subroute",
558  "routes": [
559  {
560  "handle": [
561  {
562  "handler": "rewrite",
563  "uri": "{http.matchers.file.relative}"
564  }
565  ],
566  "match": [
567  {
568  "file": {
569  "try_files": [
570  "{http.request.uri.path}{http.request.uri.path}.html",
571  "{http.request.uri.path}/"
572  ]
573  }
574  }
575  ]
576  },
577  {
578  "handle": [
579  {
580  "handler": "file_server",
581  "hide": [
582  "/etc/caddy/Caddyfile"
583  ]
584  }
585  ]
586  }
587  ]
588  }
589  ]
590  }
591  ]
592  }
593  ],
594  "terminal": true
595  },
596  {
597  "match": [
598  {
599  "host": [
600  "hg.compiler.company"
601  ]
602  }
603  ],
604  "handle": [
605  {
606  "handler": "subroute",
607  "routes": [
608  {
609  "group": "group31",
610  "handle": [
611  {
612  "handler": "subroute",
613  "routes": [
614  {
615  "handle": [
616  {
617  "handler": "headers",
618  "response": {
619  "deferred": true,
620  "set": {
621  "Access-Control-Allow-Headers": [
622  "*"
623  ],
624  "Access-Control-Allow-Methods": [
625  "GET, POST, PUT, PATCH, DELETE, OPTIONS"
626  ],
627  "Access-Control-Allow-Origin": [
628  "https://packy.compiler.company"
629  ],
630  "Access-Control-Max-Age": [
631  "3600"
632  ]
633  }
634  }
635  },
636  {
637  "handler": "static_response",
638  "status_code": 204
639  }
640  ]
641  }
642  ]
643  }
644  ],
645  "match": [
646  {
647  "header": {
648  "Origin": [
649  "https://packy.compiler.company"
650  ]
651  },
652  "method": [
653  "OPTIONS"
654  ]
655  }
656  ]
657  },
658  {
659  "group": "group31",
660  "handle": [
661  {
662  "handler": "subroute",
663  "routes": [
664  {
665  "handle": [
666  {
667  "handler": "headers",
668  "response": {
669  "deferred": true,
670  "set": {
671  "Access-Control-Allow-Origin": [
672  "{http.request.header.origin}"
673  ],
674  "Access-Control-Expose-Headers": [
675  "*"
676  ]
677  }
678  }
679  }
680  ]
681  }
682  ]
683  }
684  ],
685  "match": [
686  {
687  "header": {
688  "Origin": [
689  "https://packy.compiler.company"
690  ]
691  },
692  "not": [
693  {
694  "method": [
695  "OPTIONS"
696  ]
697  }
698  ]
699  }
700  ]
701  },
702  {
703  "group": "group31",
704  "handle": [
705  {
706  "handler": "subroute",
707  "routes": [
708  {
709  "handle": [
710  {
711  "handler": "headers",
712  "response": {
713  "deferred": true,
714  "set": {
715  "Access-Control-Allow-Headers": [
716  "*"
717  ],
718  "Access-Control-Allow-Methods": [
719  "GET, POST, PUT, PATCH, DELETE, OPTIONS"
720  ],
721  "Access-Control-Allow-Origin": [
722  "https://cdn.compiler.company"
723  ],
724  "Access-Control-Max-Age": [
725  "3600"
726  ]
727  }
728  }
729  },
730  {
731  "handler": "static_response",
732  "status_code": 204
733  }
734  ]
735  }
736  ]
737  }
738  ],
739  "match": [
740  {
741  "header": {
742  "Origin": [
743  "https://cdn.compiler.company"
744  ]
745  },
746  "method": [
747  "OPTIONS"
748  ]
749  }
750  ]
751  },
752  {
753  "group": "group31",
754  "handle": [
755  {
756  "handler": "subroute",
757  "routes": [
758  {
759  "handle": [
760  {
761  "handler": "headers",
762  "response": {
763  "deferred": true,
764  "set": {
765  "Access-Control-Allow-Origin": [
766  "{http.request.header.origin}"
767  ],
768  "Access-Control-Expose-Headers": [
769  "*"
770  ]
771  }
772  }
773  }
774  ]
775  }
776  ]
777  }
778  ],
779  "match": [
780  {
781  "header": {
782  "Origin": [
783  "https://cdn.compiler.company"
784  ]
785  },
786  "not": [
787  {
788  "method": [
789  "OPTIONS"
790  ]
791  }
792  ]
793  }
794  ]
795  },
796  {
797  "group": "group31",
798  "handle": [
799  {
800  "handler": "subroute",
801  "routes": [
802  {
803  "handle": [
804  {
805  "handler": "headers",
806  "response": {
807  "deferred": true,
808  "set": {
809  "Access-Control-Allow-Headers": [
810  "*"
811  ],
812  "Access-Control-Allow-Methods": [
813  "GET, POST, PUT, PATCH, DELETE, OPTIONS"
814  ],
815  "Access-Control-Allow-Origin": [
816  "https://vc.compiler.company"
817  ],
818  "Access-Control-Max-Age": [
819  "3600"
820  ]
821  }
822  }
823  },
824  {
825  "handler": "static_response",
826  "status_code": 204
827  }
828  ]
829  }
830  ]
831  }
832  ],
833  "match": [
834  {
835  "header": {
836  "Origin": [
837  "https://vc.compiler.company"
838  ]
839  },
840  "method": [
841  "OPTIONS"
842  ]
843  }
844  ]
845  },
846  {
847  "group": "group31",
848  "handle": [
849  {
850  "handler": "subroute",
851  "routes": [
852  {
853  "handle": [
854  {
855  "handler": "headers",
856  "response": {
857  "deferred": true,
858  "set": {
859  "Access-Control-Allow-Origin": [
860  "{http.request.header.origin}"
861  ],
862  "Access-Control-Expose-Headers": [
863  "*"
864  ]
865  }
866  }
867  }
868  ]
869  }
870  ]
871  }
872  ],
873  "match": [
874  {
875  "header": {
876  "Origin": [
877  "https://vc.compiler.company"
878  ]
879  },
880  "not": [
881  {
882  "method": [
883  "OPTIONS"
884  ]
885  }
886  ]
887  }
888  ]
889  },
890  {
891  "handle": [
892  {
893  "handler": "reverse_proxy",
894  "upstreams": [
895  {
896  "dial": "rurik:8888"
897  }
898  ]
899  }
900  ]
901  }
902  ]
903  }
904  ],
905  "terminal": true
906  },
907  {
908  "match": [
909  {
910  "host": [
911  "compiler.company"
912  ]
913  }
914  ],
915  "handle": [
916  {
917  "handler": "subroute",
918  "routes": [
919  {
920  "handle": [
921  {
922  "handler": "vars",
923  "root": "/home/web/www/compiler.company"
924  }
925  ]
926  },
927  {
928  "group": "group33",
929  "handle": [
930  {
931  "handler": "subroute",
932  "routes": [
933  {
934  "handle": [
935  {
936  "handler": "headers",
937  "response": {
938  "deferred": true,
939  "set": {
940  "Access-Control-Allow-Headers": [
941  "*"
942  ],
943  "Access-Control-Allow-Methods": [
944  "GET, POST, PUT, PATCH, DELETE, OPTIONS"
945  ],
946  "Access-Control-Allow-Origin": [
947  "https://cdn.compiler.company"
948  ],
949  "Access-Control-Max-Age": [
950  "3600"
951  ]
952  }
953  }
954  },
955  {
956  "handler": "static_response",
957  "status_code": 204
958  }
959  ]
960  }
961  ]
962  }
963  ],
964  "match": [
965  {
966  "header": {
967  "Origin": [
968  "https://cdn.compiler.company"
969  ]
970  },
971  "method": [
972  "OPTIONS"
973  ]
974  }
975  ]
976  },
977  {
978  "group": "group33",
979  "handle": [
980  {
981  "handler": "subroute",
982  "routes": [
983  {
984  "handle": [
985  {
986  "handler": "headers",
987  "response": {
988  "deferred": true,
989  "set": {
990  "Access-Control-Allow-Origin": [
991  "{http.request.header.origin}"
992  ],
993  "Access-Control-Expose-Headers": [
994  "*"
995  ]
996  }
997  }
998  }
999  ]
1000  }
1001  ]
1002  }
1003  ],
1004  "match": [
1005  {
1006  "header": {
1007  "Origin": [
1008  "https://cdn.compiler.company"
1009  ]
1010  },
1011  "not": [
1012  {
1013  "method": [
1014  "OPTIONS"
1015  ]
1016  }
1017  ]
1018  }
1019  ]
1020  },
1021  {
1022  "group": "group33",
1023  "handle": [
1024  {
1025  "handler": "subroute",
1026  "routes": [
1027  {
1028  "handle": [
1029  {
1030  "handler": "rewrite",
1031  "uri": "{http.matchers.file.relative}"
1032  }
1033  ],
1034  "match": [
1035  {
1036  "file": {
1037  "try_files": [
1038  "{http.request.uri.path}",
1039  "{http.request.uri.path.html}",
1040  "{http.request.uri.path}/"
1041  ]
1042  }
1043  }
1044  ]
1045  },
1046  {
1047  "handle": [
1048  {
1049  "handler": "file_server",
1050  "hide": [
1051  "/etc/caddy/Caddyfile"
1052  ]
1053  }
1054  ]
1055  }
1056  ]
1057  }
1058  ]
1059  }
1060  ]
1061  }
1062  ],
1063  "terminal": true
1064  }
1065  ],
1066  "logs": {
1067  "logger_names": {
1068  "cdn.compiler.company": [
1069  "log0"
1070  ],
1071  "hg.compiler.company": [
1072  "log3"
1073  ],
1074  "packy.compiler.company": [
1075  "log2"
1076  ]
1077  },
1078  "skip_hosts": [
1079  "compiler.company",
1080  "demo.compiler.company",
1081  "the.compiler.company"
1082  ]
1083  }
1084  }
1085  }
1086  }
1087  }
1088 }