Server Name Issue

Marcus Clyne maccaday at gmail.com
Sat Dec 12 06:19:35 MSK 2009


merlin corey wrote:
> Hello,
>
> You need a custom log format that uses $http_host instead of
> $server_name, please see
> http://wiki.nginx.org/NginxHttpLogModule#log_format .
>   
Or in this case, just leave out the server_name directive entirely.
> You may also want to use 'server_name_in_redirect off' to ensure that
> server_name is not passed back to clients.
>
> Thanks,
> Merlin
>
> On Mon, Dec 7, 2009 at 3:32 AM, Rahul Bansal <rahul.bansal at rtcamp.com> wrote:
>   
>> Hi All,
>> I have created a virtual host where I want to handle unlimited top-level
>> domains.
>> Domains are registered elsewhere and I am using "A record" pointing to my
>> nginx server's dedciated IP at respective domains registrars/name-servers.
>> I have following in my vhost config file...
>>     
>>> server {
>>>
>>>         listen          80 default;
>>>
>>> server_name _ "";
>>>       
>> Everything is working expect some minor issues.
>>
>> Logs shows server name as "_"
>> Cookies and some scripts where host is supposed to be host in URL, it is set
>> to "_"
>>
>> Its not breaking anything. And everything is working cool.
>> But is there anyway to have server_name set to "host"name in HTTP request?
>> Thanks,
>> -Rahul
>> _______________________________________________
>> nginx mailing list
>> nginx at nginx.org
>> http://nginx.org/mailman/listinfo/nginx
>>
>>
>>     
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
>   
Marcus.




More information about the nginx mailing list