Mass virtual hosting and global redirect

Igor Sysoev is at rambler-co.ru
Tue Jun 16 17:56:04 MSD 2009


On Tue, Jun 16, 2009 at 09:43:24AM -0400, NoSync wrote:

> As suggested, I tried using servername in place of the if block:
> 
> server_name ~^(.*)\.(.*\..*)$;
> set $sub $1;
> set $domain $2;
> 
> but I get errors like this:
> 
> 2009/06/16 13:33:20  6443#0: *4 malloc() 18446744073709551612 bytes failed (12: ), client: 89.96.xxx.xxx, server: ~^(.*)\.(.*\..*)$, request: "GET / HTTP/1.1", host: "www.xxxxxxx.eu"
> 2009/06/16 13:33:24  6443#0: *15 malloc() 18446744073709551612 bytes failed (12: ), client: 89.96.xxx.xxx, server: ~^(.*)\.(.*\..*)$, request: "GET / HTTP/1.1", host: "www.yyyyyyy.it"
> 
> while with the previous configuration everything's fine. Rewrites from non-www to www are also perfectly working with your regexp (thanks). I'm using nginx 0.7.51 on Ubuntu Jaunty. I could find some earlier discussions about similar problems, but my russian ain't the best despite some courses I took in the past. :-)

Could you create debug log of a request ?


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





More information about the nginx mailing list