<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="Helvetica, Arial, sans-serif">I'd like to do a geo based
redirect. Users who initially hit my site would be given an IP round
robin from the&nbsp; 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.<br>
<br>
http {<br>
...<br>
&nbsp;&nbsp;&nbsp; geo $region {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; default NA;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; include georegions.conf;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
...<br>
<br>
server {<br>
...<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; location ~ ^/index.php {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ($region = NA)<br>
&nbsp;--&gt; what to write here to redirect to other IP? <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; include
fastcgi_params; }<br>
&nbsp;&nbsp;&nbsp; }<br>
... other servers...<br>
<br>
<br>
Thanks for any help with this.<br>
Chris :)<br>
</font>
</body>
</html>