Hi
Sorry for the long delay in reply. Project was holded a little, and i forgot to check up on it...
So, as mentioned, we have 2 apis, and swagger for both, and they both listen to internally /
.
Re access log, can i get the output of that into the docker logs? Or does it have to be a file?
If I today go to api.domain.tld/swagger
i get our current api
and my wish is, to have the new stuff on api.domain.tld/newstuff/swagger
while having the new stuff listening on /
internally.
The actual api reqeusts should also go to tne /newstuff
so like GET api.domain.tld/newstuff/data
internally in newstuff should be GET api.domain.tld/data
but redirected to the new_api
This is the config setup I get from traefik
{
"http": {
"routers": {
"current_api": {
"entryPoints": ["web"],
"service": "current_api",
"rule": "Host(`api.domain.tld`)"
},
"new_api": {
"entryPoints": ["web"],
"service": "new_api",
"rule": "Host(`api.domain.tld`) \\u0026\\u0026 Path(`/newstuff`)"
},
"frontend": {
"entryPoints": ["web"],
"service": "frontend",
"rule": "Host(`domain.tld`)"
}
},
"services": {
"current_api": {
"loadBalancer": {
"servers": [{
"url": "http://10.0.7.28:80"
}
],
"passHostHeader": true
}
},
"new_api": {
"loadBalancer": {
"servers": [{
"url": "http://10.0.7.27:80"
}
],
"passHostHeader": true
}
},
"frontend": {
"loadBalancer": {
"servers": [{
"url": "http://10.0.7.31:80"
}
],
"passHostHeader": true
}
}
},
},
"tcp": {},
"udp": {}
}
" providerName = docker
I have also tried using the middleware stripprefix, which sets up like this:
{
"http": {
"routers": {
"current_api": {
"entryPoints": ["web"],
"service": "current_api",
"rule": "Host(`api.domain.tld`)"
},
"new_api": {
"entryPoints": ["web"],
"middlewares": ["new_api-replacepath"],
"service": "new_api",
"rule": "Host(`api.domain.tld`) \\u0026\\u0026 Path(`/newstuff`)"
},
"frontend": {
"entryPoints": ["web"],
"service": "frontend",
"rule": "Host(`domain.tld`)"
}
},
"services": {
"current_api": {
"loadBalancer": {
"servers": [{
"url": "http://10.0.7.28:80"
}
],
"passHostHeader": true
}
},
"new_api": {
"loadBalancer": {
"servers": [{
"url": "http://10.0.7.27:80"
}
],
"passHostHeader": true
}
},
"frontend": {
"loadBalancer": {
"servers": [{
"url": "http://10.0.7.31:80"
}
],
"passHostHeader": true
}
}
},
"middlewares": {
"new_api-replacepath": {
"stripPrefix": {
"prefixes": ["/newstuff"],
"forceSlash": true
}
}
}
},
"tcp": {},
"udp": {}
}
" providerName = docker