isLetsEncrypt() -> isCertLetsEncrypt(), isCustomCert() -> isCertCustom()
parent
9ab32cc1f7
commit
3396047a5c
|
@ -137,6 +137,12 @@ main .options .card .form-subgroup {
|
||||||
padding-left: 0.5rem;
|
padding-left: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main .options .card .form-subgroup .form-subgroup {
|
||||||
|
margin-left: 0;
|
||||||
|
border-left: 1px solid #d7e0ea;
|
||||||
|
padding-left: 0.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
main .options .card .form-control[type="text"]:placeholder-shown,
|
main .options .card .form-control[type="text"]:placeholder-shown,
|
||||||
main .options .card .form-control[type="email"]:placeholder-shown {
|
main .options .card .form-control[type="email"]:placeholder-shown {
|
||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
|
|
|
@ -112,7 +112,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.sslCertificate = function() {
|
$scope.sslCertificate = function() {
|
||||||
if ($scope.isLetsEncrypt()) {
|
if ($scope.isCertLetsEncrypt()) {
|
||||||
return '/etc/letsencrypt/live/' + $scope.domain() + '/fullchain.pem'
|
return '/etc/letsencrypt/live/' + $scope.domain() + '/fullchain.pem'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.sslCertificateKey = function() {
|
$scope.sslCertificateKey = function() {
|
||||||
if ($scope.isLetsEncrypt()) {
|
if ($scope.isCertLetsEncrypt()) {
|
||||||
return '/etc/letsencrypt/live/' + $scope.domain() + '/privkey.pem'
|
return '/etc/letsencrypt/live/' + $scope.domain() + '/privkey.pem'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -285,11 +285,11 @@
|
||||||
return $scope.isHTTPS() && $scope.data.force_https;
|
return $scope.isHTTPS() && $scope.data.force_https;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.isLetsEncrypt = function() {
|
$scope.isCertLetsEncrypt = function() {
|
||||||
return $scope.isHTTPS() && $scope.data.cert_type === 'letsencrypt';
|
return $scope.isHTTPS() && $scope.data.cert_type === 'letsencrypt';
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.isCustomCert = function() {
|
$scope.isCertCustom = function() {
|
||||||
return $scope.isHTTPS() && $scope.data.cert_type === 'custom';
|
return $scope.isHTTPS() && $scope.data.cert_type === 'custom';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -102,37 +102,37 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="form-subgroup pt-2" ng-if="isHTTPS()" ng-cloak>
|
<div class="form-subgroup pt-2" ng-if="isHTTPS()" ng-cloak>
|
||||||
Certification type:
|
Certification type:
|
||||||
</div>
|
<div class="form-subgroup">
|
||||||
<div class="form-subgroup" ng-if="isHTTPS()" ng-cloak>
|
<div class="form-check">
|
||||||
<div class="form-check">
|
<input class="form-check-input" type="radio" id="letsencrypt" ng-model="data.cert_type" value="letsencrypt">
|
||||||
<input class="form-check-input" type="radio" id="letsencrypt" ng-model="data.cert_type" value="letsencrypt">
|
<label class="form-check-label" for="letsencrypt">
|
||||||
<label class="form-check-label" for="letsencrypt">
|
<span tooltips tooltip-template="Let's Encrypt based SSl.<br><br><i>free, automated, and open Certificate Authority</i>">Let's Encrypt</span>
|
||||||
<span tooltips tooltip-template="Let's Encrypt based SSl.<br><br><i>free, automated, and open Certificate Authority</i>">Let's Encrypt</span>
|
</label>
|
||||||
</label>
|
</div>
|
||||||
</div>
|
<div class="form-group" ng-if="isHTTPS() && isCertLetsEncrypt()">
|
||||||
<div class="form-group" ng-if="isHTTPS() && isLetsEncrypt()">
|
<label class="form-label small">
|
||||||
<label class="form-label small">
|
<span tooltips tooltip-template="Let's Encrypt expiration notify e-mail.">E-mail</span>
|
||||||
<span tooltips tooltip-template="Let's Encrypt expiration notify e-mail.">E-mail</span>
|
</label>
|
||||||
</label>
|
<input type="text" class="form-control form-control-sm" ng-model="data.email" placeholder="{{ 'hello@' + domain() }}">
|
||||||
<input type="text" class="form-control form-control-sm" ng-model="data.email" placeholder="{{ 'hello@' + domain() }}">
|
</div>
|
||||||
</div>
|
<div class="form-check">
|
||||||
<div class="form-check">
|
<input class="form-check-input" type="radio" id="custom_cert" ng-model="data.cert_type" value="custom">
|
||||||
<input class="form-check-input" type="radio" id="custom_cert" ng-model="data.cert_type" value="custom">
|
<label class="form-check-label" for="custom_cert">
|
||||||
<label class="form-check-label" for="custom_cert">
|
<span tooltips tooltip-template="Custom certificate">Custom certificate</span>
|
||||||
<span tooltips tooltip-template="Custom certificate">Custom certificate</span>
|
</label>
|
||||||
</label>
|
</div>
|
||||||
</div>
|
<div class="form-group" ng-if="isHTTPS() && isCertCustom()">
|
||||||
<div class="form-group" ng-if="isHTTPS() && isCustomCert()">
|
<label class="form-label small">
|
||||||
<label class="form-label small">
|
<span tooltips tooltip-template="Path to crt file"><code>ssl_certificate</code></span>
|
||||||
<span tooltips tooltip-template="Path to crt file"><code>ssl_certificate</code></span>
|
</label>
|
||||||
</label>
|
<input type="text" class="form-control form-control-sm" ng-model="data.ssl_certificate" placeholder="{{ '/etc/nginx/ssl/' + domain() + '.crt' }}">
|
||||||
<input type="text" class="form-control form-control-sm" ng-model="data.ssl_certificate" placeholder="{{ '/etc/nginx/ssl/' + domain() + '.crt' }}">
|
</div>
|
||||||
</div>
|
<div class="form-group" ng-if="isHTTPS() && isCertCustom()">
|
||||||
<div class="form-group" ng-if="isHTTPS() && isCustomCert()">
|
<label class="form-label small">
|
||||||
<label class="form-label small">
|
<span tooltips tooltip-template="Path to key file"><code>ssl_certificate_key</code></span>
|
||||||
<span tooltips tooltip-template="Path to key file"><code>ssl_certificate_key</code></span>
|
</label>
|
||||||
</label>
|
<input type="text" class="form-control form-control-sm" ng-model="data.ssl_certificate_key" placeholder="{{ '/etc/nginx/ssl/' + domain() + '.key' }}">
|
||||||
<input type="text" class="form-control form-control-sm" ng-model="data.ssl_certificate_key" placeholder="{{ '/etc/nginx/ssl/' + domain() + '.key' }}">
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
|
@ -394,7 +394,7 @@
|
||||||
<pre><code class="nginx" ng-include="'templates/conf/_ssl.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
|
<pre><code class="nginx" ng-include="'templates/conf/_ssl.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></code></pre>
|
||||||
</div><div id="file-ssl" class="code highlighted"></div>
|
</div><div id="file-ssl" class="code highlighted"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xl-6 grid-item file" ng-if="isModularized() && isLetsEncrypt()" ng-cloak>
|
<div class="col-xl-6 grid-item file" ng-if="isModularized() && isCertLetsEncrypt()" ng-cloak>
|
||||||
<strong>/etc/nginx/_letsencrypt.conf</strong>
|
<strong>/etc/nginx/_letsencrypt.conf</strong>
|
||||||
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-letsencrypt" ngclipboard-success="clipboardSuccess('_letsencrypt.conf')">
|
<button class="btn btn-light btn-clipboard" ngclipboard data-clipboard-target="#file-letsencrypt" ngclipboard-success="clipboardSuccess('_letsencrypt.conf')">
|
||||||
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
|
<img src="assets/img/clipboard-dark.svg" alt="Copy to clipboard">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
--></span><!--
|
--></span><!--
|
||||||
|
|
||||||
|
|
||||||
โ Let's Encrypt --><span ng-if="isLetsEncrypt()">
|
โ Let's Encrypt --><span ng-if="isCertLetsEncrypt()">
|
||||||
|
|
||||||
<span class="hljs-comment"># <strong>HTTPS</strong>: create ACME-challenge common directory</span>
|
<span class="hljs-comment"># <strong>HTTPS</strong>: create ACME-challenge common directory</span>
|
||||||
<span class="hljs-section">sudo</span> <span class="hljs-attribute">-u</span> {{ data.userย }} <span class="hljs-section">sh</span> <span class="hljs-attribute">-c</span> "<span class="hljs-section">mkdir</span> <span class="hljs-attribute">-p</span> /var/www/_letsencrypt"
|
<span class="hljs-section">sudo</span> <span class="hljs-attribute">-u</span> {{ data.userย }} <span class="hljs-section">sh</span> <span class="hljs-attribute">-c</span> "<span class="hljs-section">mkdir</span> <span class="hljs-attribute">-p</span> /var/www/_letsencrypt"
|
||||||
|
|
|
@ -30,7 +30,7 @@ server {<!--
|
||||||
ssl_certificate {{ sslCertificate() }};
|
ssl_certificate {{ sslCertificate() }};
|
||||||
ssl_certificate_key {{ sslCertificateKey() }};<!--
|
ssl_certificate_key {{ sslCertificateKey() }};<!--
|
||||||
|
|
||||||
โ Let's Encrypt --><span ng-if="isLetsEncrypt()">
|
โ Let's Encrypt --><span ng-if="isCertLetsEncrypt()">
|
||||||
ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem;</span></span><!--
|
ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem;</span></span><!--
|
||||||
|
|
||||||
โ unified && โ PHP --><span ng-if="isUnified() && isPHP()">
|
โ unified && โ PHP --><span ng-if="isUnified() && isPHP()">
|
||||||
|
@ -97,7 +97,7 @@ server {
|
||||||
ssl_certificate {{ sslCertificate() }};
|
ssl_certificate {{ sslCertificate() }};
|
||||||
ssl_certificate_key {{ sslCertificateKey() }};<!--
|
ssl_certificate_key {{ sslCertificateKey() }};<!--
|
||||||
|
|
||||||
โ Let's Encrypt --><span ng-if="isLetsEncrypt()">
|
โ Let's Encrypt --><span ng-if="isCertLetsEncrypt()">
|
||||||
ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem;</span></span>
|
ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem;</span></span>
|
||||||
|
|
||||||
# disable access_log
|
# disable access_log
|
||||||
|
@ -145,7 +145,7 @@ server {
|
||||||
ssl_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem;
|
ssl_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem;
|
||||||
ssl_certificate_key /etc/letsencrypt/live/{{ domain() }}/privkey.pem;<!--
|
ssl_certificate_key /etc/letsencrypt/live/{{ domain() }}/privkey.pem;<!--
|
||||||
|
|
||||||
โ Let's Encrypt --><span ng-if="isLetsEncrypt()">
|
โ Let's Encrypt --><span ng-if="isCertLetsEncrypt()">
|
||||||
ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem;</span></span>
|
ssl_trusted_certificate /etc/letsencrypt/live/{{ domain() }}/fullchain.pem;</span></span>
|
||||||
|
|
||||||
return 301 https://{{ isWWW() ? 'www.' : '' }}{{ domain() }}$request_uri;
|
return 301 https://{{ isWWW() ? 'www.' : '' }}{{ domain() }}$request_uri;
|
||||||
|
@ -164,21 +164,21 @@ server {
|
||||||
|
|
||||||
server_name .{{ domain() }};<!--
|
server_name .{{ domain() }};<!--
|
||||||
|
|
||||||
โ modularized && โ Let's Encrypt --><span ng-if="isModularized() && isLetsEncrypt()">
|
โ modularized && โ Let's Encrypt --><span ng-if="isModularized() && isCertLetsEncrypt()">
|
||||||
|
|
||||||
include _letsencrypt.conf;</span><!--
|
include _letsencrypt.conf;</span><!--
|
||||||
|
|
||||||
โ unified && โ Let's Encrypt --><span ng-if="isUnified() && isLetsEncrypt()">
|
โ unified && โ Let's Encrypt --><span ng-if="isUnified() && isCertLetsEncrypt()">
|
||||||
|
|
||||||
<ng-include ng-include-tabs="2" src="'templates/conf/_letsencrypt.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></ng-include></span><!--
|
<ng-include ng-include-tabs="2" src="'templates/conf/_letsencrypt.conf.html?v=COMMIT_HASH'" onload="refreshHighlighting()"></ng-include></span><!--
|
||||||
|
|
||||||
โ Let's Encrypt --><span ng-if="isLetsEncrypt()">
|
โ Let's Encrypt --><span ng-if="isCertLetsEncrypt()">
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 301 https://{{ isWWW() ? 'www.' : '' }}{{ domain() }}$request_uri;
|
return 301 https://{{ isWWW() ? 'www.' : '' }}{{ domain() }}$request_uri;
|
||||||
}</span><!--
|
}</span><!--
|
||||||
|
|
||||||
โ Let's Encrypt --><span ng-if="!isLetsEncrypt()">
|
โ Let's Encrypt --><span ng-if="!isCertLetsEncrypt()">
|
||||||
|
|
||||||
return 301 https://{{ isWWW() ? 'www.' : '' }}{{ domain() }}$request_uri;</span>
|
return 301 https://{{ isWWW() ? 'www.' : '' }}{{ domain() }}$request_uri;</span>
|
||||||
}</span>
|
}</span>
|
||||||
|
|
Loadingโฆ
Reference in New Issue