nginx balncing GeoIp

Alexander Moskalenko alexander.moskalenko gmail.com
19 10:31:07 MSK 2010


   geo  geoip,     default

2010/3/19 ashem <nginx-forum at nginx.us>:
>  .
>      : http://www.ruby-forum.com/topic/170541    load balancing   GeoIP.        .  nginx 0.7.65   geoip.
>  config :
> # cat nginx.conf
> #user www www;
>
> worker_processes 2;
>
> #pid /var/run/nginx.pid;
>
> #             [ debug | info | notice | warn | error | crit ]
>
> #error_log /var/log/nginx.error_log info;
> events {
> worker_connections 1024;
> # use [ kqueue | rtsig | epoll | /dev/poll | select | poll ];
>
> }
>
>
> http {
>  log_format timing '$remote_addr - $remote_user [$time_local] $request ' 'upstream_response_time $upstream_response_time ' 'msec $msec request_time $request_time';
>
>  geoip_country /usr/share/GeoIP/GeoIP.dat;
>
>  upstream de.server {
>    server server3.com;
>
>    }
>  upstream cn.server {
>    server server2.com;
>    }
>  upstream default.server {
>    server server1.com;
>    }
>
>
>  server {
>    listen 1.2.3.4:80;
>    server_name serbvername.com;
>    error_log logs/site_err.log debug;
>    access_log logs/site_acc.log;
>    rewrite_log on;
>
>  location / {
>
>    proxy_set_header X-Real-IP $remote_addr;
>    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>    proxy_set_header Host $host;
>    proxy_pass http://$geoip_country_code.server$request_uri;
>
>  }
> }
>          ip      upstream   default.server.       ?   
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?21,65458,65458#msg-65458
>
>
> _______________________________________________
> nginx-ru mailing list
> nginx-ru at nginx.org
> http://nginx.org/mailman/listinfo/nginx-ru
>


nginx-ru