Ingress as backend service, posted 404 error

Hi All,

I have an ingress (nginx ingress controller) running as backend service of Traefik, but it posted 404 Not Found when I access the entrypoint:
static.yml:

global:
  checkNewVersion: true
  sendAnonymousUsage: false

entryPoints:
  traefik:
    address: :8081
  web:
    address: :8000
  websecure:
    address: :8443

providers:
  file:
    filename: dynamic.yml
    watch: true

log:
  level: debug

api:
  dashboard: true
  insecure: true

dynamic.yml

http:
  routers:
    whoamirouter:
      rule: Host(`centos8-1`)
      service: whoami
  services:
    whoami:
      loadBalancer:
        servers:
          - url: "http://dujas-whoami.com"

It came back with 404 when accessing to http://centos8-1:8000:

[dujas@centos8-1 ~]$ curl http://centos8-1:8000/
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>

May I know if there is any misconfiguration?

Thanks.

ok, I figured out the issue here, when I added:

passHostHeader: false

to loadBalancer, the response is correct.

But I am still curious the reason why this will work, could anyone help me out here?

Thanks.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.