0

Is there any way to test routing rules\config without actually running HAProxy and backend servers?

JRomio
  • 2,407
  • 3
  • 26
  • 27

1 Answers1

2

I suggest setting up a staging/test environment to do this. You can verify that the configuration is valid(syntactically) using the following command:

haproxy -c -f </path/to/haproxy.cfg>

However, it will not tell you if the configuration is functional from a logical perspective.

The flag ‘-c‘, enables “check mode” and is the flag that tells HAProxy to test, without actually starting or restarting HAProxy.

P....
  • 17,421
  • 2
  • 32
  • 52
Nick Ramirez
  • 473
  • 5
  • 15
  • did some edits to the original answer, if you do not agree feel free to reject the edit suggestion if you got any. – P.... Jul 07 '22 at 15:46