This question has been answered by multiple community members. See the first response.
[Tue Jul 29 22:59:55 2014] [warn] [client 118.192.48.27] mod_fcgid: stderr: PHP Notice: Undefined index: HTTP_HOST in /var/www/vhosts/terasaki.se/httpdocs/core/config/config.inc.php on line 65 [Wed Jul 30 17:04:15 2014] [warn] [client 1.163.222.143] mod_fcgid: stderr: PHP Notice: Undefined index: HTTP_HOST in /var/www/vhosts/terasaki.se/httpdocs/core/config/config.inc.php on line 65
if (!defined('MODX_HTTP_HOST')) {
if(defined('PHP_SAPI') && (PHP_SAPI == "cli" || PHP_SAPI == "embed")) {
$http_host='www.terasaki.se';
define('MODX_HTTP_HOST', $http_host);
} else {
$http_host= $_SERVER['HTTP_HOST'];
$http_host= array_key_exists('HTTP_HOST', $_SERVER) ? $_SERVER['HTTP_HOST'] : 'www.terasaki.se';
if ($_SERVER['SERVER_PORT'] != 80) {
$http_host= str_replace(':' . $_SERVER['SERVER_PORT'], '', $http_host); // remove port from HTTP_HOST
}
$http_host .= ($_SERVER['SERVER_PORT'] == 80 || $isSecureRequest) ? '' : ':' . $_SERVER['SERVER_PORT'];
define('MODX_HTTP_HOST', $http_host);
}
}$http_host= $_SERVER['HTTP_HOST'];
//$http_host= $_SERVER['HTTP_HOST'];