diff --git a/advanced/index.php b/advanced/index.php
index 89c49051..a5545ea4 100644
--- a/advanced/index.php
+++ b/advanced/index.php
@@ -15,11 +15,11 @@ function validate_server_name($domain) { // Cr: http://stackoverflow.com/a/46948
&& preg_match("/^[^\.]{1,63}(\.[^\.]{1,63})*$/", $domain)); // Length of each label
}
-// Validate SERVER_NAME output
-if (validate_server_name($_SERVER["SERVER_NAME"]) === TRUE) {
- $serverName = $_SERVER["SERVER_NAME"];
+// Validate HTTP_HOST output
+if (validate_server_name($_SERVER["HTTP_HOST"]) === TRUE) {
+ $serverName = $_SERVER["HTTP_HOST"];
} else {
- die("[ERROR]: SERVER_NAME
header output does not appear to be valid: ".$_SERVER["SERVER_NAME"]."
");
+ die("[ERROR]: HTTP_HOST
header output does not appear to be valid: ".$_SERVER["HTTP_HOST"]."
");
}
// Get values from setupVars.conf