4 messages in ru.sysoev.nginxCorrect way to do redirect
FromSent OnAttachments
Chris SaveryAug 29, 2008 3:28 pm 
Igor SysoevAug 30, 2008 8:33 am 
Chris SaveryAug 30, 2008 9:10 am 
Igor SysoevAug 30, 2008 9:49 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Correct way to do redirectActions...
From:Chris Savery (chri@public.gmane.org)
Date:Aug 29, 2008 3:28:02 pm
List:ru.sysoev.nginx

I'd like to do a geo based redirect. Users who initially hit my site would be given an IP round robin from the DNS servers. Then each node would test the ip and decide if it would be better to redirect to the closer node. Only doing this for index.php, eg.

http { ... geo $region { default NA; include georegions.conf; } ...

server { ... location ~ ^/index.php { if ($region = NA) --> what to write here to redirect to other IP? } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; include fastcgi_params; } } ... other servers...

Thanks for any help with this. Chris :)