0

I have the following frontend configuration for HAProxy:

frontend www_front
    bind *:80
    bind *:8080
    mode http
    option httplog
    default_backend www_back
    acl restrict_page path_sub /manager
    acl restrict_page url_sub  /manager
    http-request deny if restrict_page

After restarting the haproxy service, the first access to http://x.x.x.x/manager indeed returned 403 Forbidden. However, subsequent accesses to the same URL did not get blocked.

Where did I go wrong?

pepoluan
  • 4,918
  • 3
  • 43
  • 71

1 Answers1

0

Okay, so apparently there were multiple haproxy processes running simultaneously.

So, if you end up here because you are in the same situation, here's the solution:

First, stop haproxy using the init script.

Next, check that there are NO other haproxy processes running; use pkill haproxy, and if that fails, pkill -9 haproxy.

Finally, restart haproxy.

pepoluan
  • 4,918
  • 3
  • 43
  • 71