Last active
July 9, 2023 08:04
-
-
Save agbaraka/311d39ae37c48e2d049e4d16204234aa to your computer and use it in GitHub Desktop.
Caddy server v2: reverse proxy config json for multiple virtual hosts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apps": { | |
"http": { | |
"servers": { | |
"example": { | |
"listen": ["127.0.0.1:80"], | |
"routes": [ | |
{ | |
"match":[{"host":["a.myhost.com"]}], | |
"handle": [ | |
{ | |
"handler": "reverse_proxy", | |
"upstreams": [ | |
{ | |
"host": "http://localhost:8080" | |
} | |
] | |
} | |
] | |
}, | |
{ | |
"match":[{"host":["b.myhost.com"]}], | |
"handle": [ | |
{ | |
"handler": "reverse_proxy", | |
"upstreams": [ | |
{ | |
"host": "http://localhost:3000" | |
} | |
] | |
} | |
] | |
} | |
], | |
"automatic_https":{ | |
"disable": true | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment