Skip to content

Commit 7476c19

Browse files
committed
ability to change Let's Encrypt webroot
fixes digitalocean#64
1 parent 837f9e3 commit 7476c19

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

public/assets/js/app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
resolver_cloudflare: true,
7070
resolver_google: true,
7171
resolver_opendns: true,
72+
directory_letsencrypt: '/var/www/_letsencrypt/',
7273

7374
// COMMON - SECURITY
7475
referrer_policy: 'no-referrer-when-downgrade',

public/index.html

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,6 +649,17 @@
649649
</div>
650650
</div>
651651
</div>
652+
<div class="form-group row" ng-class="{ disabled: !hasCertLetsEncrypt() }">
653+
<label class="col-sm-3 col-form-label col-form-label-sm">
654+
Let's Encrypt webroot
655+
</label>
656+
<div class="col-sm-9">
657+
<input type="text"
658+
class="form-control form-control-sm"
659+
ng-model="data.directory_letsencrypt"
660+
ng-class="{ 'input-changed': data.directory_letsencrypt !== defaultData.directory_letsencrypt }">
661+
</div>
662+
</div>
652663
</div>
653664
<div class="tab-pane tab-security" ng-class="{ 'active': tab_common === 'security' }">
654665
<div class="form-group row">

public/templates/commands.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
2929
✔ Let's Encrypt
3030
--><span ng-if="hasCertLetsEncrypt()"><span class="hljs-comment"><span class="counter">.</span> Create a common ACME-challenge directory (for Let's Encrypt):</span>
31-
<span class="hljs-section">mkdir</span> <span class="hljs-attribute">-p</span> /var/www/_letsencrypt
32-
<span class="hljs-section">chown</span> <span class="hljs-attribute">{{ data.user }}</span> /var/www/_letsencrypt</span></span><!--
31+
<span class="hljs-section">mkdir</span> <span class="hljs-attribute">-p</span> {{ data.directory_letsencrypt }}
32+
<span class="hljs-section">chown</span> <span class="hljs-attribute">{{ data.user }}</span> {{ data.directory_letsencrypt }}</span></span><!--
3333
3434
3535
@@ -52,7 +52,7 @@
5252
--><span ng-if="isWWW(_site) || isRedirect(_site)"><span class="hljs-attribute" tooltips tooltip-template="--domain" tooltip-side="top">-d</span> www.{{ _domain }} </span><!--
5353
--><span ng-if="isCDN(_site)"><span class="hljs-attribute" tooltips tooltip-template="--domain" tooltip-side="top">-d</span> cdn.{{ _domain }} </span><!--
5454
--><span class="hljs-attribute">--email</span> {{ data.sites[_site].email ? data.sites[_site].email : 'info@' + _domain }} <!--
55-
--><span class="hljs-attribute" tooltips tooltip-template="--webroot-path" tooltip-side="top">-w</span> /var/www/_letsencrypt <!--
55+
--><span class="hljs-attribute" tooltips tooltip-template="--webroot-path" tooltip-side="top">-w</span> {{ data.directory_letsencrypt }} <!--
5656
--><span class="hljs-attribute" tooltips tooltip-template="--non-interactive" tooltip-side="top">-n</span> <!--
5757
--><span class="hljs-attribute">--agree-tos</span> <!--
5858
--><span class="hljs-attribute">--force-renewal</span></span>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# ACME-challenge
22
location ^~ /.well-known/acme-challenge/ {
3-
root /var/www/_letsencrypt;
3+
root {{ data.directory_letsencrypt }};
44
}

0 commit comments

Comments
 (0)