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