acl includes (-f) do not read from config directory

From: Finn Arne Gangstad <finnag#pvv.org>
Date: Tue, 6 Sep 2011 14:50:14 +0200


When specifying file includes, e.g. "acl bad-ip src -f bad-ips.txt" haproxy reads the file from _current directory_, which to me at least is a bit unxepected. I would have expected it to look in the directory where the haproxy configuration file was located.

Now we have this behaviour:

cd /
haproxy -c -f /etc/haproxy/haproxy.cfg -> failure

cd /etc/haproxy
haproxy -c -f /etc/haproxy/haproxy.cfg -> success

It's possible to use (and I guess everyone uses?) absolute paths, but this makes it a bit more tricky to validate rules before copying them out, and makes sharing configurations between machines with different configuration paths more painful.

Would a patch to make haproxy look relative to the configuration file be welcome, or is this too intrusive?

Received on 2011/09/06 14:50

This archive was generated by hypermail 2.2.0 : 2011/09/06 15:00 CEST