ability to change Let's Encrypt webroot

fixes #64
pull/103/head
Bálint Szekeres 6 years ago
parent 837f9e33a8
commit 7476c194cb

@ -69,6 +69,7 @@
resolver_cloudflare: true, resolver_cloudflare: true,
resolver_google: true, resolver_google: true,
resolver_opendns: true, resolver_opendns: true,
directory_letsencrypt: '/var/www/_letsencrypt/',
// COMMON - SECURITY // COMMON - SECURITY
referrer_policy: 'no-referrer-when-downgrade', referrer_policy: 'no-referrer-when-downgrade',

@ -649,6 +649,17 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group row" ng-class="{ disabled: !hasCertLetsEncrypt() }">
<label class="col-sm-3 col-form-label col-form-label-sm">
Let's Encrypt webroot
</label>
<div class="col-sm-9">
<input type="text"
class="form-control form-control-sm"
ng-model="data.directory_letsencrypt"
ng-class="{ 'input-changed': data.directory_letsencrypt !== defaultData.directory_letsencrypt }">
</div>
</div>
</div> </div>
<div class="tab-pane tab-security" ng-class="{ 'active': tab_common === 'security' }"> <div class="tab-pane tab-security" ng-class="{ 'active': tab_common === 'security' }">
<div class="form-group row"> <div class="form-group row">

@ -28,8 +28,8 @@
✔ Let's Encrypt ✔ Let's Encrypt
--><span ng-if="hasCertLetsEncrypt()"><span class="hljs-comment"><span class="counter">.</span> Create a common ACME-challenge directory (for Let's Encrypt):</span> --><span ng-if="hasCertLetsEncrypt()"><span class="hljs-comment"><span class="counter">.</span> Create a common ACME-challenge directory (for Let's Encrypt):</span>
<span class="hljs-section">mkdir</span> <span class="hljs-attribute">-p</span> /var/www/_letsencrypt <span class="hljs-section">mkdir</span> <span class="hljs-attribute">-p</span> {{ data.directory_letsencrypt }}
<span class="hljs-section">chown</span> <span class="hljs-attribute">{{ data.user }}</span> /var/www/_letsencrypt</span></span><!-- <span class="hljs-section">chown</span> <span class="hljs-attribute">{{ data.user }}</span> {{ data.directory_letsencrypt }}</span></span><!--
@ -52,7 +52,7 @@
--><span ng-if="isWWW(_site) || isRedirect(_site)"><span class="hljs-attribute" tooltips tooltip-template="--domain" tooltip-side="top">-d</span> www.{{ _domain }} </span><!-- --><span ng-if="isWWW(_site) || isRedirect(_site)"><span class="hljs-attribute" tooltips tooltip-template="--domain" tooltip-side="top">-d</span> www.{{ _domain }} </span><!--
--><span ng-if="isCDN(_site)"><span class="hljs-attribute" tooltips tooltip-template="--domain" tooltip-side="top">-d</span> cdn.{{ _domain }} </span><!-- --><span ng-if="isCDN(_site)"><span class="hljs-attribute" tooltips tooltip-template="--domain" tooltip-side="top">-d</span> cdn.{{ _domain }} </span><!--
--><span class="hljs-attribute">--email</span> {{ data.sites[_site].email ? data.sites[_site].email : 'info@' + _domain }} <!-- --><span class="hljs-attribute">--email</span> {{ data.sites[_site].email ? data.sites[_site].email : 'info@' + _domain }} <!--
--><span class="hljs-attribute" tooltips tooltip-template="--webroot-path" tooltip-side="top">-w</span> /var/www/_letsencrypt <!-- --><span class="hljs-attribute" tooltips tooltip-template="--webroot-path" tooltip-side="top">-w</span> {{ data.directory_letsencrypt }} <!--
--><span class="hljs-attribute" tooltips tooltip-template="--non-interactive" tooltip-side="top">-n</span> <!-- --><span class="hljs-attribute" tooltips tooltip-template="--non-interactive" tooltip-side="top">-n</span> <!--
--><span class="hljs-attribute">--agree-tos</span> <!-- --><span class="hljs-attribute">--agree-tos</span> <!--
--><span class="hljs-attribute">--force-renewal</span></span> --><span class="hljs-attribute">--force-renewal</span></span>

@ -1,4 +1,4 @@
# ACME-challenge # ACME-challenge
location ^~ /.well-known/acme-challenge/ { location ^~ /.well-known/acme-challenge/ {
root /var/www/_letsencrypt; root {{ data.directory_letsencrypt }};
} }

Loading…
Cancel
Save