rewrite catch all subdomain

Denis S. Filimonov den.lists at gmail.com
Mon Mar 10 19:58:19 MSK 2008


On Monday 10 March 2008 12:48:13 Pedro Axl wrote:
> Thank You Denis,
>
> It's strange, If I enter directly on domain.com:8080 I receive an error
> (of the Firefox): "The page isn't redirecting properly
> Firefox has detected that the server is redirecting the request for this
> address in a way that will never complete."
>
Not sure what exactly it means. Could be a redirection loop.
Try wget, its output is more verbose and sensible.

> If I enter www.domain.com:8080 I am redirected to domain.com:8080 and I
> got that error.
>
> But if I go to anything.domain.com:8080 I receive the "Server not found"
> error.
>
Looks like there's no wildcard DNS record for *.domain.com


> Denis S. Filimonov wrote:
> > Try this:
> >
> > location / {
> >     rewrite .* http://mydomain.com:8080$uri last;
> > }



-- 
Denis.





More information about the nginx mailing list