Hi Merlin,<div><br></div><div>Thanks for ur reply.</div><div><br></div><div>But can I do something like &quot;set server_name $http_host&quot;?</div><div><br></div><div>For some reason that I cannot explain (lack of my knowledge may be) I need server_name to reflect http_host value.</div>

<div><br></div><div>Is there any workaround which just works with nginx 0.7.</div><div><br></div><div>Thanks,</div><div>-Rahul<br>
<br><br><div class="gmail_quote">On Sat, Dec 12, 2009 at 5:49 AM, merlin corey <span dir="ltr">&lt;<a href="mailto:merlincorey@dc949.org">merlincorey@dc949.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

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