rewrite catch all subdomain

Pedro Axl lists at ruby-forum.com
Mon Mar 10 19:48:13 MSK 2008


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."

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.




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

-- 
Posted via http://www.ruby-forum.com/.





More information about the nginx mailing list