If I run the following:
service haproxy start
I create a HAProxy daemon which runs in the background.
How do I create a non-daemon HAProxy instance?
If I run the following:
service haproxy start
I create a HAProxy daemon which runs in the background.
How do I create a non-daemon HAProxy instance?
First, the daemon of HAProxy must be stopped :
sudo systemctl haproxy stop
To start HAProxy by disabling the background mode :
sudo haproxy -db -f /etc/haproxy/haproxy.cfg
To stop HAProxy, just press CTRL+C
Extract of manual :
For debugging, the '-db' option is very useful as it temporarily disables daemon mode and multi-process mode. The service can then be stopped by simply pressing Ctrl-C, without having to edit the config nor run full debug.
/usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg
Or:
haproxy -f /etc/haproxy/haproxy.cfg