HAProxy: adding map file via GUI?
Hello! I’m trying to add a map file to use in my HAProxy configuration via the package’s GUI. In the “Files” tab, I added the file and gave it a type of “Write to Disk”. When I save, then save the configuration, the file is nowhere to be found. I can still see it in the “Files” tab, but I cannot find it anywhere in the file system. I’m the command prompt, I even tried running
find / -name '*filename*'and no results are returned. I’d expect the file to be saved in /var/etc/haproxy just like Lua files, but it’s nowhere to be found. I’ve found nothing that looks like an error in the logs.
Does anyone know where this file is being saved, if at all? Or is there another way to add a map file that I can reference in my HAProxy config? Thank you!
I am replying to add an update. I also posted to the pfSense issue tracker, and was told that this is not a bug, that files are only written when used by a frontend/backend. I confirmed that this is true, for a frontend I selected the "Write to disk" file that I selected as an error file, and it was indeed written.
The issue is, though, the only way I can find to have a front/backend to use a file is as an error file. I can add the file as an error file for a non-existent error code (like 12345), but that seems extremely hacky. I tried using the map file in a custom ACL like as follows:
var(txn.txnhost),lower,map_beg(subdomains.map) -m str -i string1
However, if there's no file written, I can't reference the file in my ACL:
[ALERT] 069/145712 (574) : parsing [/var/etc/haproxy_test/haproxy.cfg:58] : error detected while parsing ACL 'is_string1' : invalid args in converter 'map_beg' : failed to open pattern file <subdomains.map> in ACL expression 'var(txn.txnhost),lower,map_beg(subdomains.map)'
Is there another way I can add a map file via the GUI without having to add the file as an error file? Thank you!
That would likely need to be a feature request.