Dynamic IP on NGINX geo module without restart

Posted by joaorvmaia on Server Fault See other posts from Server Fault or by joaorvmaia
Published on 2012-11-08T10:25:17Z Indexed on 2012/11/08 11:06 UTC
Read the original article Hit count: 371

Filed under:
|
|

I want create a task on my Capistrano deploy to put my public IP on geo module configuration of my NGINX server without restart NGINX, is it possible? Example, my /etc/nginx/nginx.conf:

geo $geo {
  default no;
  include /home/deploy_user/appname/shared/ip_list;
} 

The file /home/deploy_user/appname/shared/ip_list I will provide during deploy. I need this because my public IP can change many times.

Regards, João

© Server Fault or respective owner

Related posts about nginx

Related posts about capistrano