haproxy -c -f /etc/haproxy/haproxy.cfg

Category: Web Servers & Proxies

haproxy -c -f /etc/haproxy/haproxy.cfg

Validate HAProxy configuration syntax

-c checks the configuration files and exits before binding any ports, reporting errors with line numbers. Run it after every config edit, because a bad reload can take the proxy down. The exit status is zero only when the config is valid.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.