Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISPConfig
ISPConfig 3
Commits
50306f02
Commit
50306f02
authored
Feb 29, 2016
by
Marius Burkard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed ssl disabling on letsencrypt and added aliasdomain (Fixes: #3779)
parent
96f31df0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
18 deletions
+21
-18
server/plugins-available/apache2_plugin.inc.php
server/plugins-available/apache2_plugin.inc.php
+10
-8
server/plugins-available/nginx_plugin.inc.php
server/plugins-available/nginx_plugin.inc.php
+11
-10
No files found.
server/plugins-available/apache2_plugin.inc.php
View file @
50306f02
...
...
@@ -1119,14 +1119,7 @@ class apache2_plugin {
}
*/
//* Generate Let's Encrypt SSL certificat
if
(
$data
[
'new'
][
'ssl'
]
==
'y'
&&
$data
[
'new'
][
'ssl_letsencrypt'
]
==
'y'
&&
(
// ssl and let's encrypt is active
(
$data
[
'old'
][
'ssl'
]
==
'n'
||
$data
[
'old'
][
'ssl_letsencrypt'
]
==
'n'
)
// we have new let's encrypt configuration
||
(
$data
[
'old'
][
'domain'
]
!=
$data
[
'new'
][
'domain'
])
// we have domain update
||
(
$data
[
'old'
][
'subdomain'
]
!=
$data
[
'new'
][
'subdomain'
])
// we have new or update on "auto" subdomain
||
(
$data
[
'new'
][
'type'
]
==
'subdomain'
)
// we have new or update on subdomain
||
(
$data
[
'old'
][
'type'
]
==
'alias'
||
$data
[
'new'
][
'type'
]
==
'alias'
)
// we have new or update on aliasdomain
))
{
if
(
$data
[
'new'
][
'ssl'
]
==
'y'
&&
$data
[
'new'
][
'ssl_letsencrypt'
]
==
'y'
)
{
if
(
substr
(
$domain
,
0
,
2
)
===
'*.'
)
{
// wildcard domain not yet supported by letsencrypt!
$app
->
log
(
'Wildcard domains not yet supported by letsencrypt, so changing '
.
$domain
.
' to '
.
substr
(
$domain
,
2
),
LOGLEVEL_WARN
);
...
...
@@ -1135,7 +1128,16 @@ class apache2_plugin {
$data
[
'new'
][
'ssl_domain'
]
=
$domain
;
$vhost_data
[
'ssl_domain'
]
=
$domain
;
}
//* Generate Let's Encrypt SSL certificat
if
(
$data
[
'new'
][
'ssl'
]
==
'y'
&&
$data
[
'new'
][
'ssl_letsencrypt'
]
==
'y'
&&
(
// ssl and let's encrypt is active
(
$data
[
'old'
][
'ssl'
]
==
'n'
||
$data
[
'old'
][
'ssl_letsencrypt'
]
==
'n'
)
// we have new let's encrypt configuration
||
(
$data
[
'old'
][
'domain'
]
!=
$data
[
'new'
][
'domain'
])
// we have domain update
||
(
$data
[
'old'
][
'subdomain'
]
!=
$data
[
'new'
][
'subdomain'
])
// we have new or update on "auto" subdomain
||
(
$data
[
'new'
][
'type'
]
==
'subdomain'
)
// we have new or update on subdomain
||
(
$data
[
'old'
][
'type'
]
==
'alias'
||
$data
[
'new'
][
'type'
]
==
'alias'
)
// we have new or update on aliasdomain
))
{
// default values
$temp_domains
=
array
();
$lddomain
=
$domain
;
...
...
server/plugins-available/nginx_plugin.inc.php
View file @
50306f02
...
...
@@ -1232,15 +1232,7 @@ class nginx_plugin {
$tpl
->
setVar
(
'ssl_letsencrypt'
,
"n"
);
//* Generate Let's Encrypt SSL certificat
if
(
$data
[
'new'
][
'ssl'
]
==
'y'
&&
$data
[
'new'
][
'ssl_letsencrypt'
]
==
'y'
&&
(
// ssl and let's encrypt is active
(
$data
[
'old'
][
'ssl'
]
==
'n'
||
$data
[
'old'
][
'ssl_letsencrypt'
]
==
'n'
)
// we have new let's encrypt configuration
||
(
$data
[
'old'
][
'domain'
]
!=
$data
[
'new'
][
'domain'
])
// we have domain update
||
(
$data
[
'old'
][
'subdomain'
]
!=
$data
[
'new'
][
'subdomain'
])
// we have new or update on "auto" subdomain
||
(
$data
[
'new'
][
'type'
]
==
'subdomain'
)
// we have new or update on subdomain
||
(
$data
[
'old'
][
'type'
]
==
'alias'
||
$data
[
'new'
][
'type'
]
==
'alias'
)
// we have new or update on alias domain
))
{
if
(
$data
[
'new'
][
'ssl'
]
==
'y'
&&
$data
[
'new'
][
'ssl_letsencrypt'
]
==
'y'
)
{
//* be sure to have good domain
if
(
substr
(
$domain
,
0
,
2
)
===
'*.'
)
{
// wildcard domain not yet supported by letsencrypt!
...
...
@@ -1250,7 +1242,16 @@ class nginx_plugin {
$data
[
'new'
][
'ssl_domain'
]
=
$domain
;
$vhost_data
[
'ssl_domain'
]
=
$domain
;
}
//* Generate Let's Encrypt SSL certificat
if
(
$data
[
'new'
][
'ssl'
]
==
'y'
&&
$data
[
'new'
][
'ssl_letsencrypt'
]
==
'y'
&&
(
// ssl and let's encrypt is active
(
$data
[
'old'
][
'ssl'
]
==
'n'
||
$data
[
'old'
][
'ssl_letsencrypt'
]
==
'n'
)
// we have new let's encrypt configuration
||
(
$data
[
'old'
][
'domain'
]
!=
$data
[
'new'
][
'domain'
])
// we have domain update
||
(
$data
[
'old'
][
'subdomain'
]
!=
$data
[
'new'
][
'subdomain'
])
// we have new or update on "auto" subdomain
||
(
$data
[
'new'
][
'type'
]
==
'subdomain'
)
// we have new or update on subdomain
||
(
$data
[
'old'
][
'type'
]
==
'alias'
||
$data
[
'new'
][
'type'
]
==
'alias'
)
// we have new or update on alias domain
))
{
// default values
$temp_domains
=
array
();
$lddomain
=
$domain
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment