Fix LE certs for IPv6 only domains Fixes 394

This commit is contained in:
Jamie Curnow 2020-05-20 22:21:26 +10:00
parent 8ab161a3ee
commit 2ebfdcf0c9
2 changed files with 7 additions and 0 deletions

View File

@ -273,6 +273,7 @@ const internalNginx = {
return new Promise((resolve, reject) => {
let template = null;
let filename = '/data/nginx/temp/letsencrypt_' + certificate.id + '.conf';
try {
template = fs.readFileSync(__dirname + '/../templates/letsencrypt-request.conf', {encoding: 'utf8'});
} catch (err) {
@ -280,6 +281,8 @@ const internalNginx = {
return;
}
certificate.ipv6 = internalNginx.ipv6Enabled();
renderEngine
.parseAndRender(template, certificate)
.then((config_text) => {

View File

@ -2,6 +2,10 @@
server {
listen 80;
{% if ipv6 -%}
listen [::]:80;
{% endif %}
server_name {{ domain_names | join: " " }};
access_log /data/logs/letsencrypt-requests.log standard;