Reverse Haproxy with multiple frontend



  • Hi

    I use the last version of pfsense with reverse haproxy on a dedicated server (no virtualisation)
    I have 1 WAN public ip and 2 web server on my lan

    i have many url some must be redirect to websrv1 and the other must be redirect to webserv2
    I create 4 Frontend:

    First    => is to connect extrernal adress (wan) is name Frontend1 no backend setup in acl. only option  "forwardfor" is enable
    Second => share frontend (linked to frontend1) in acl I create acl with host matches  test.toto.com => backend srvweb1
    Third    => share frontend (linked to frontend1) in acl I create acl with host matches  test2.toto.com => backend srvweb1
    Fourth  => share frontend (linked to frontend1) in acl I create acl with host matches  test.a.anotherdomain.com => backend srvweb2

    If I enable each Frontend Independently it work perfectly
    If I enable first,second and third it work perfectly
    If I enable all frontend the second and the fourth work perfectly but not the Third( i have an error 404 url not found on this server if I test this frontend alone I work perfectly…)...

    How must i setup for all my uri works in same time

    Thanks for your help

    Lolo



  • Can you enable all, save, apply, then share your config from the bottom of the settings tab?```
    Paste it in a code block.

    Looking at the acl's there should provide some context about the order of processing and how stuff gets combined. And why some might never be reached.
    
    Some basic questions that might give you a clue.. None have a default-backend? All 2-4 have a 'use-backend action'? Do you use ssl? With certificate acl's ? Acl's named differently across all frontends?


  • Hi

    a big thanks
    The problem was i don't define a name for the acl action  :-[ :-[ :-[

    thank you for your help.

    Lolo