in reply to Re: finding my hostnamein thread finding my hostname
But since you'd of course be using CGI you could just use virtual_host and/or server_name instead of mucking with the environment directly.