evoacme: support for haproxy

This commit is contained in:
Victor LABORIE 2017-03-09 17:50:01 +01:00
parent 78a2fd9830
commit 338c083c5b
2 changed files with 24 additions and 0 deletions

View File

@ -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

View File

@ -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;
}
}