Skip to content

Commit ca9ac33

Browse files
author
Till Brehm
committed
Fixed: Issue #3751 ISPConfig Login fails on Nginx servers in 3.1-dev version.
1 parent 99768b5 commit ca9ac33

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

interface/lib/app.inc.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ public function __construct() {
7171
$this->uses('session');
7272
$sess_timeout = $this->conf('interface', 'session_timeout');
7373
$cookie_domain = (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST']);
74+
75+
// Workaround for Nginx servers
76+
if($cookie_domain == '_') {
77+
$tmp = explode(':',$_SERVER["HTTP_HOST"]);
78+
$cookie_domain = $tmp[0];
79+
unset($tmp);
80+
}
7481
$cookie_secure = ($_SERVER["HTTPS"] == 'on')?true:false;
7582
if($sess_timeout) {
7683
/* check if user wants to stay logged in */

0 commit comments

Comments
 (0)