Mittels domain-anstatt IP im haproxy-backend

Habe ich 2 virtuelle host

app.Beispiel.com:80 auf ip-Adresse xxx.xxx.xxx.xxx

app2.Beispiel.com:80 auf ip-Adresse yyy.yyy.yyy.yyy

mein haproxy-Adresse ist sss.sss.sss.sss

Dies ist haproxy Konfiguration :

global
   log 127.0.0.1 local0 notice
   maxconn 2000
   user haproxy
   group haproxy

defaults
  log     global
  mode    http
  option  httplog
  option  dontlognull
  retries 3
  option redispatch
  timeout connect  5000
  timeout client  10000
  timeout server  10000

frontend www-http
    mode http
    bind *:80
    default_backend appname
    stats enable
    stats uri /haproxy?stats
    stats auth admin:password
    stats show-node

backend appname
  balance roundrobin
  option httpclose
  option forwardfor
  server lamp1 app.example.com:80 check
  server lamp2 app2.example.com:80 check

Beim Zugriff auf haproxy IP-Adresse, web-browser xampp dashboard anstelle von backend-Inhalte.

Wie kann ich machen, haproxy Umleitung zu-backend-Inhalte?

  • Im backend hinzufügen http-request set-header Host app.example.com vielleicht?
Schreibe einen Kommentar