diff --git a/evoacme/files/evoacme.sh b/evoacme/files/evoacme.sh index 7c2a43b7..954b9391 100755 --- a/evoacme/files/evoacme.sh +++ b/evoacme/files/evoacme.sh @@ -56,4 +56,13 @@ if [ $? == 0 ]; then fi fi +which haproxy>/dev/null +if [ $? == 0 ]; then + mkdir -p /etc/ssl/haproxy -m 700 + cat $CRT_DIR/${vhost}-fullchain.pem $SSL_KEY_DIR/${vhost}.key > /etc/ssl/haproxy/${vhost}.pem + haproxy -c -f /etc/haproxy/haproxy.cfg 1>/dev/null + if [ $? == 0 ]; then + service haproxy reload + fi +fi exit 0 diff --git a/evoacme/templates/nginx-haproxy.conf.j2 b/evoacme/templates/nginx-haproxy.conf.j2 new file mode 100644 index 00000000..4d76a302 --- /dev/null +++ b/evoacme/templates/nginx-haproxy.conf.j2 @@ -0,0 +1,15 @@ +server { + listen unix:/run/nginx-letsencrypt.sock; + + root {{ evoacme_acme_dir }}; + + access_log /var/log/nginx/access.log; + error_log /var/log/nginx/error.log; + + server_name _; + + location / { + try_files $uri =404; + allow all; + } +}