malloc() errors - (some type of redirect loop?)
gnexus
nginx-forum at nginx.us
Mon Sep 13 17:00:25 MSD 2010
gnexus Wrote:
-------------------------------------------------------
> Maxim Dounin Wrote:
> --------------------------------------------------
> -----
> > > # Extracts the subdomain to a
> variable
> > > if ($host ~ "^(.*).xxxxxxxx.net") {
> > > set $sub $1;
> > > set $domain $2;
> > > }
> >
> > You have regexp with one capture, but try to
> use
> > $2.
> >
> We tried using $2 with two captures also, but it
> did not seem to work correctly.
Okay, it looks like this was the problem:
[b]set $domain $2;[/b]
We initially had that in there to also set the domain directory
automatically. But since the regex was incorrect it did not function
correctly. We took out the code to set the subdirectory by domain, but
since we planned to try and use it again we did not remove that variable
statement. I didn't realize that it would create a problem if not
removed or commented out. But it certainly did!
Seems to work good now.
I'll be glad to see the malloc error problem resolved.
That way it will be easier to isolate my buggy code. . .
Thanks!
Gnexus
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,129739,129991#msg-129991
More information about the nginx
mailing list