I'm replacing a Zuul Router, that uses static routes like this:
(Sample Zuul Config)
zuul:
routes:
# routes are in a specific order of precedence
# Client services
report-service:
path: /**/reports/**
url: https://report-app-dev.....
data-service:
path: /**/datasets/**/data
url: https://dataset-data-app-dev.....
The Report backend service should respond to:
GET http://mybackendservice:port/health
GET http://mybackendservice:port/info
GET http://mybackendservice:port/reports/whatever
I've created several frontend rules..
traefik.frontend.rule.rule1 Path: /reports/health; ReplacePath: /health
traefik.frontend.rule.rule2 Path: /reports/info; ReplacePath: /info
traefik.frontend.rule.rule3 Path: /reports
It shows up in the trafefik dashboard as:
frontend-fabric:/FA_App/Report-App
Route Rule
Path: /reports/health; ReplacePath: /health
Path: /reports/info; ReplacePath: /info
Path: /reports/
Entry Points
http
Backend
fabric:/FA_App/Report-App
But, testing in the browser, I get:
http://myfrontend:port/reports/health - 404 page not found
http://myfrontend:port/reports/info - 404 page not found
http://myfrontend:port/reports - 404 page not found
The Access log shows:
[23/Jul/2019:17:17:35 +0000] "GET /reports/health HTTP/1.1" 404 19 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36" 2 "backend not found" "/reports/health" 0ms
[25/Jul/2019:16:17:37 +0000] "GET /reports HTTP/1.1" 404 19 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36" 3 "backend not found" "/reports" 4ms
[25/Jul/2019:16:17:38 +0000] "GET /favicon.ico HTTP/1.1" 404 19 "http://myurl.com:8029/reports" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36" 4 "backend not found" "/favicon.ico" 0ms