cens/ohmageServer — Issue #230: detect own ip address
Author: jeroenooms
Created: 2012-03-03 05:27:38+00:00
State: open

The viz proxy needs to know it's own ip address, to pass this address inside the 'serverurl' parameter to the viz server (so that the viz server knows where to download the data). I am not sure what the current method is for determining the server's ip address (I assume it is something like inspecting ifconfig output) but it does not seem to work on servers behind a proxy or so.

In many cloud environments, for example amazon EC2, there is often less than 1 public ip per vm. Therefore a server does not have it's own public ip address. Instead the server has a LAN ip address, and you can separately purchase 'elastic ip addresses' that you can then bind to your vm's.

Long story short: ifconfig gives an ip address that won't be helpful for the viz server. Maybe we could use something like http://jsonip.com/ to obtain the public ip address.