Hitch proxy with wildcards

Now it working. To resume: the $LE_Domain was not working so instead on the script I have put

...
domain=$(basename $(pwd))
...

and now everything is working.
Thank you all :slight_smile:

To recap:
I have used this script in /usr/local/bin/hitch-renew-hook:

#!/bin/bash
# Full path to pre-generated Diffie Hellman Parameters file
dhparams=/etc/hitch/dhparams.pem
acmehome=/root/.acme.sh
domain=$(basename $(pwd))
set noglob

umask 077

cat "${acmehome}/${domain}/${domain}.key" \
"${acmehome}/${domain}/fullchain.cer" \
"${dhparams}" > "${acmehome}/${domain}/hitch-bundle.pem"

then you have to do this command (assuming you use dynu.com as your dns provider):

acme.sh --issue -d domain.com -d '*.mydomain.com' --dns dns_dynu --renew-hook '/usr/local/bin/hitch-renew-hook' --post-hook 'systemctl reload hitch'

and then, the first time you issue a certificate you have to run this command:

acme.sh --renew --force -d mydomain.com -d '*.mydomain.com'

You are all set to use hitch with letsencrypt. See more at: https://docs.varnish-software.com/tutorials/hitch-letsencrypt/

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.