Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4740

Redirect to backend using the requested IP

$
0
0

@be_tnt wrote:

Hello!

I am using HAProxy 1.8. My haProxy receives http requests on 2 interfaces. I would need to redirect those requests to backend depending on the requested IP.

With an example:

Field A for domain1 is linked to IP1
Field A for domain2 is linked to IP2

HaProxy is listening on both IP1 & IP2 for requests (in my config file, in frontend section, I have bind *:80)

I defined 2 backends:
backend1 send requests on server1 and port 80
backend2 send requests on server1 and port 81

Is this possible using ACL to redirect requests from domain1 to server1 and requests from domain2 to server2?

I guess I can do it by creating multiple frontend sections with a bind on a specific IP but I wanted to know if it would be possible to do it with acl.

Thx in advance!

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 4740

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>