From 7cdfdda45c6dc0218c30fa463fc44a3124ae69f5 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Wed, 25 Sep 2013 17:08:06 +0200 Subject: [PATCH] allow non-standard ssl-port for ssl-redirects (actually, put the port in there if non-standard is defined in ip/port combination), fixes #201 Signed-off-by: Michael Kaufmann (d00p) --- scripts/jobs/cron_tasks.inc.http.10.apache.php | 6 +++++- scripts/jobs/cron_tasks.inc.http.30.nginx.php | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/jobs/cron_tasks.inc.http.10.apache.php b/scripts/jobs/cron_tasks.inc.http.10.apache.php index a85d1b04..ab9953f9 100644 --- a/scripts/jobs/cron_tasks.inc.http.10.apache.php +++ b/scripts/jobs/cron_tasks.inc.http.10.apache.php @@ -638,7 +638,11 @@ class apache && $domain['ssl'] == '1' && $domain['ssl_redirect'] == '1') ) { - $domain['documentroot'] = 'https://' . $domain['domain'] . '/'; + $_sslport = ''; + if ($domain['port'] != '443') { + $_sslport = ":".$domain['port']; + } + $domain['documentroot'] = 'https://' . $domain['domain'] . $_sslport . '/'; } if ($ssl_vhost === true diff --git a/scripts/jobs/cron_tasks.inc.http.30.nginx.php b/scripts/jobs/cron_tasks.inc.http.30.nginx.php index cce689eb..f1a82f82 100644 --- a/scripts/jobs/cron_tasks.inc.http.30.nginx.php +++ b/scripts/jobs/cron_tasks.inc.http.30.nginx.php @@ -398,7 +398,11 @@ class nginx && $domain['ssl'] == '1' && $domain['ssl_redirect'] == '1') { - $domain['documentroot'] = 'https://' . $domain['domain'] . '/'; + $_sslport = ''; + if ($domain['port'] != '443') { + $_sslport = ":".$domain['port']; + } + $domain['documentroot'] = 'https://' . $domain['domain'] . $_sslport . '/'; } // if the documentroot is an URL we just redirect