I have a dead simple Golang microservice (no Docker, just simple binary file) which returns simple message on GET-request.
curl -XGET 'http://localhost:36001/api/operability/list'
{"message": "ping 123"}
Now I want to do reverse proxy via Traefik-v2, so I've made configuration file "traefik.toml":
[global]
checkNewVersion = false
sendAnonymousUsage = false
[entryPoints]
[entryPoints.web]
address = ":8090"
[entryPoints.traefik]
address = ":8091"
[log]
level = "DEBUG"
filePath = "logs/traefik.log"
[accessLog]
filePath = "logs/access.log"
[api]
insecure = true
dashboard = true
[providers]
[providers.file]
filename = "traefik.toml"
# dynamic conf
[http]
[http.routers]
[http.routers.my-router]
rule = "Path(`/proxy`)"
service = "my-service"
entryPoints = ["web"]
[http.services]
[http.services.my-service.loadBalancer]
[[http.services.my-service.loadBalancer.servers]]
url = "http://localhost:36001"
Starting Traefik (I'm using binary distribution):
traefik --configFile=traefik.toml
Now dashboard on port 8091 works like a charm, but I struggle with reverse proxy request. I suppose it should look like this (based on my configuration file):
curl -XGET 'http://localhost:8090/proxy/api/operability/list'
But all I get it's just:
404 page not found
The question is: is there any mistake in configuration file or is it just a request typo?
edit: My configuration file is based on answers in this questions:
edit #2: Traefik version info:
traefik version
Version: 2.4.9
Codename: livarot
Go version: go1.16.5
Built: 2021-06-21T16:17:58Z
OS/Arch: windows/amd64