janeczku/haproxy-acme-validation-plugin

LUA does not find files

Closed this issue · 4 comments

Hi,

I am using the latest letsencrypt + validation plugin on haproxy 1.6.4 and Ubuntu 14.04 LTS, but the LUA script cannot find files, even if I manually put them there.

for example, if I put the file abcd in /mnt/ssl/letsencrypt/.well-known/acme-challenge/ (which is my folder), and access the url in my browser, I get the following error

Apr 18 20:44:17 haproxy haproxy[57762]: [acme] http-01 token not found: abcd (client-ip: .)

I added a debug log to the script and let it print the pathname:

Apr 18 20:54:30 haproxy haproxy[57762]: [acme] getting token from: /mnt/ssl/letsencrypt/.well-known/acme-challenge/abcd

The folder /mnt/ssl/ is fully accessible r+w for all users, it is a network drive though (I use multiple haproxy instances and want them all to access the same folder).

ls -al /mnt/ssl/letsencrypt/.well-known/acme-challenge/abcd
-rwxrwxrwx 1 root root 11 Apr 18 20:38 /mnt/ssl/letsencrypt/.well-known/acme-challenge/abcd

Any idea what it could be?

@elmalto Looks to me like your HAProxy is configured with the chroot option. Please past the global section of your config.

Yes you're right:

global
  log /dev/log    local0
  log /dev/log    local1 notice
  chroot /var/lib/haproxy
  ## acme plugin
  lua-load /etc/haproxy/acme-http01-webroot.lua

Any difficulties following the instructions in the README? It's all in there... 😀

Sorry about that, was not aware that the plugin would only be able to access files in chroot even if I set the path in the config file