<div dir="ltr">Can't believe!! You are right.<div><br></div><div>Thanks for the suggestion.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 20, 2015 at 8:44 AM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<span class=""><br>
On Sun, Jul 19, 2015 at 09:32:14PM +0530, murali kumar wrote:<br>
<br>
> Hi,<br>
><br>
> I'm beginner in nginx, and i have searched google and mailing list but no<br>
> luck.<br>
><br>
> my nginx.conf:<br>
><br>
> http{<br>
> server{<br>
> listen 80;<br>
</span>> server_name <a href="http://example.com" rel="noreferrer" target="_blank">example.com</a> <a href="http://www.example.com" rel="noreferrer" target="_blank">www.example.com</a>;<br>
<span class="">> location / {<br>
> proxy_pass http://127.0.0.1:aaaa/;<br>
> }<br>
> }<br>
> server{<br>
> listen 80;<br>
</span>> server_name <a href="http://subdomain.example.com" rel="noreferrer" target="_blank">subdomain.example.com</a>;<br>
<span class="">> location / {<br>
> proxy_pass http://127.0.0.1:bbbb/;<br>
> }<br>
> }<br>
> #rest of the default config like acces log, etc<br>
> }<br>
><br>
><br>
><br>
> Problem is after adding server block for subdomain, both request (<br>
</span>> <a href="http://example.com" rel="noreferrer" target="_blank">example.com</a>, <a href="http://subdomain.example.com" rel="noreferrer" target="_blank">subdomain.example.com</a>) loading only <a href="http://example.com" rel="noreferrer" target="_blank">example.com</a> in browser.<br>
<span class="">> If i place subdomain server block listing as first one, both request (<br>
</span>> <a href="http://example.com" rel="noreferrer" target="_blank">example.com</a>, <a href="http://subdomain.example.com" rel="noreferrer" target="_blank">subdomain.example.com</a>) loading <a href="http://subdomain.example.com" rel="noreferrer" target="_blank">subdomain.example.com</a> in<br>
<span class="">> browser.<br>
><br>
> Please suggest me what could be the problem.<br>
<br>
</span>Likely reason is a typo in the domain name as listen in the<br>
"server_name" directives.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/" rel="noreferrer" target="_blank">http://nginx.org/</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</font></span></blockquote></div><br></div>