Skip to content

Commit d228f30

Browse files
author
Marius Burkard
committed
- changed approach for nginx + letsencrypt
1 parent 799ea67 commit d228f30

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

install/tpl/nginx_ispconfig.vhost.master

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
server {
2-
location ~ /\.well-known/acme-challenge/ {
3-
root /usr/local/ispconfig/interface/acme/;
4-
index index.html index.htm;
5-
try_files $uri =404;
6-
}
7-
}
81
server {
92
listen {vhost_port};
103
listen [::]:{vhost_port} ipv6only=on;

interface/web/sites/web_vhost_domain_edit.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1340,8 +1340,9 @@ function onBeforeInsert() {
13401340

13411341
// Letsencrypt can not be activated before the website has been created
13421342
// So we deactivate it here and add a datalog update in onAfterInsert
1343-
if(isset($this->dataRecord['ssl_letsencrypt']) && $this->dataRecord['ssl_letsencrypt'] == 'y') {
1343+
if(isset($this->dataRecord['ssl_letsencrypt']) && $this->dataRecord['ssl_letsencrypt'] == 'y' && isset($this->dataRecord['ssl']) && $this->dataRecord['ssl'] == 'y') {
13441344
$this->dataRecord['ssl_letsencrypt'] = 'n';
1345+
$this->dataRecord['ssl'] = 'n';
13451346
$this->_letsencrypt_on_insert = true;
13461347
}
13471348
}
@@ -1421,6 +1422,7 @@ function onAfterInsert() {
14211422
if($this->_letsencrypt_on_insert == true) {
14221423
$tmp = $web_rec;
14231424
$tmp['ssl_letsencrypt'] = 'y';
1425+
$tmp['ssl'] = 'y';
14241426
$app->db->datalogUpdate('web_domain', $tmp, 'domain_id', $this->id);
14251427
unset($tmp);
14261428
}

0 commit comments

Comments
 (0)