Server Name Issue

Igor Sysoev igor at sysoev.ru
Sun Dec 13 10:51:43 MSK 2009


On Sun, Dec 13, 2009 at 01:12:12PM +0530, Rahul Bansal wrote:

> Hi Igor,
> 
> > > For some reason that I cannot explain (lack of my knowledge may be) I need
> > > server_name to reflect http_host value.
> >
> > Where do you use this server_name ?
> 
> I am not using "server_name" explicitly anywhere.
> 
> Earlier some logs and a cookies my PHP site showing host part as "_"
> when I set "server_name _".
> 
> Now I removed server_name and set "server_name_in_redirect off"
> Now host is being set to maindomain.com even though HOSTs are
> site1.com, site2.com and so on.
> 
> Basically I'm using wordpress MU with domain mapping.
> 
> So any random domain can be served from my server as long as it has
> account in MU and proper CNAME record at its DNS end.

Probably, you should say wordpress about SERVER_NAME:

fastcgi_param  SERVER_NAME        $host;

in fastcgi_params files.


-- 
Igor Sysoev
http://sysoev.ru/en/



More information about the nginx mailing list