By transparent, I mean passing the http header through nginx to other servers. I'm just hoping nginx can help direct the request to the correct server.
Thx
-----Original Message-----
From: "Reinis Rozitis" <r@roze.lv>
Date: Thu, 8 Apr 2010 00:27:13
To: <nginx@nginx.org>
Subject: Re: Dynamic Redirects
Depends on what you mean by 'transparently routing' - is it choosing a
different upstream (in case nginx is just a proxy) or redirecting to
diferent host/server?
While you can prolly try use this
http://github.com/chaoslawful/drizzle-nginx-module (although iirc the
possibility to get a single return value as variable back is still in TODO)
I would imagine that using some dynamic language (like php or even the
embeded perl (if you really want to do this on server side)) is more simple
and while client is being redirected its still more or less transparent to
him.
With the nginx inbuilt features (without the DB backend) its like this - a
simple rewrite:
if ($http_user_agent ~ MSIE) {
rewrite ^(.*)$ /msie/$1 break;
}
http://wiki.nginx.org/NginxHttpRewriteModule#if
rr
--------------------------------------------------
From: "Harmer, Sean" <seanharmer@gmail.com>
Sent: Wednesday, April 07, 2010 10:09 PM
To: <nginx@nginx.org>
Subject: Dynamic Redirects
> NGINX Team,
>
> Is there a way to capture the User-Agent from an HTTP Header, then query a
> database for that User-Agent, then based on the result of the database
> query, transparently route the request to an appropriate server?
>
> Thanks,
> Sean
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx