I got a really strange issue, and can’t find to get to the bottom of the problem. For some reason i got the error on what ever command i execute that the pre-hook command is not find in the PATH. Could someone guide me to get to the bottom of the case how to solve this?
My domain is:
fotoautofocus.nl
I ran this command:
sudo certbot --cert-name fotoautofocus.nl --apache --preferred-challenges http
It produced this output:
Unable to find pre-hook command /root/bin/certbot-pre in the PATH.
(PATH is /usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/vincent/.local/bin:/home/vincent/bin)
My web server is (include version):
Apache httpd-2.4.6-88.el7.centos.x86_64
The operating system my web server runs on is (include version):
Centos 7
My hosting provider, if applicable, is:
BladeVPS transip
I can login to a root shell on my machine (yes or no, or I don’t know): yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no
For extra info by using the --disable-hook-validation i got the following output:
Hook command “/root/bin/certbot-pre” returned error code 127
Error output from certbot-pre:
/bin/sh: /root/bin/certbot-pre: No such file or directory
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for fotoautofocus.nl
Waiting for verification…
Cleaning up challenges
Dry run: skipping deploy hook command: /root/bin/certbot-renew
new certificate deployed with reload of apache server; fullchain is
/etc/letsencrypt/live/fotoautofocus.nl/fullchain.pem
** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates below have not been saved.)
Congratulations, all renewals succeeded. The following certs have been renewed:
/etc/letsencrypt/live/fotoautofocus.nl/fullchain.pem (success)
** DRY RUN: simulating ‘certbot renew’ close to cert expiry
** (The test certificates above have not been saved.)
Running post-hook command: /root/bin/certbot-post
Hook command “/root/bin/certbot-post” returned error code 127
Error output from certbot-post:
/bin/sh: /root/bin/certbot-post: No such file or directory