{"id":766,"date":"2006-01-10T21:32:45","date_gmt":"2006-01-11T01:32:45","guid":{"rendered":"http:\/\/wordpress.cephas.net\/?p=766"},"modified":"2006-01-10T21:32:45","modified_gmt":"2006-01-11T01:32:45","slug":"asp-servervariables-server_name-windows-2003-iis6","status":"publish","type":"post","link":"https:\/\/cephas.net\/blog\/2006\/01\/10\/asp-servervariables-server_name-windows-2003-iis6\/","title":{"rendered":"ASP, ServerVariables, Server_Name, Windows 2003, IIS6"},"content":{"rendered":"<p>We&#8217;re in the process of upgrading our webservers to Windows 2003 and thus IIS6. One of the issues we ran into was that  the <code>Server_Name<\/code> key of the ServerVariables collection in VBScript started returning the computer name of the machine rather than the host name of the website. I spent a couple hours googling and found nothing, my recent hire found the <a href=\"http:\/\/support.microsoft.com\/?id=834141\">hot fix on microsoft.com<\/a> in about 5 minutes today (which shows how important good google skills are). In short, there&#8217;s a security issue with IIS (surprised?) whereby sending a GET request to an IIS web server without sending a host header would result in the web server returning the IP address of the web server in the content location field of the response TCP header. The easy fix is to run:<br \/>\n<code><br \/>\ncscript adsutil.vbs set w3svc\/UseHostName false<br \/>\n<\/code><br \/>\nwhich modifies all IIS web sites to return the website host name rather than the machine name \/ IP address when getting the Server_Name key of the ServerVariables collection.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re in the process of upgrading our webservers to Windows 2003 and thus IIS6. One of the issues we ran into was that the Server_Name key of the ServerVariables collection in VBScript started returning the computer name of the machine rather than the host name of the website. I spent a couple hours googling and &hellip; <a href=\"https:\/\/cephas.net\/blog\/2006\/01\/10\/asp-servervariables-server_name-windows-2003-iis6\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">ASP, ServerVariables, Server_Name, Windows 2003, IIS6<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,12],"tags":[],"_links":{"self":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/766"}],"collection":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/comments?post=766"}],"version-history":[{"count":0,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/posts\/766\/revisions"}],"wp:attachment":[{"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/media?parent=766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/categories?post=766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cephas.net\/blog\/wp-json\/wp\/v2\/tags?post=766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}