Hi Everyone,
Thanks for the really cool project, and it is really nice that JSON is now the main language for Caddy configuration.
I have been trying to setup a simple file_server with some basic proxy rules and I am currently stuck in the following proxy rule that I cannot map to the JSON configuration
The following webpack rule
proxy: {
'/api/*': {
target: 'http://0.0.0.0:9999/loadBalancer/',
pathRewrite: { '^/api': '' }
}
Note that the target is a different machine. From what I read on some posts is that we cannot
proxy to a http://0.0.0.0/PATH ?
My current configuration is
{
"admin": {
"disabled": false,
"listen": "0.0.0.0:9066"
},
"apps": {
"http": {
"http_port": 9065,
"servers": {
"srp16154lx": {
"listen": [
"0.0.0.0:9065"
],
"routes": [
{
"handle": [
{
"handler": "file_server",
"root": "./test_root",
"hide": [
"config"
]
}
]
}
]
}
}
}
}
}
I have been looking at JSON Config Structure - Caddy Documentation
but without an example it is a bit tricky
Thanks in advance,
Lucas