Dear Bob,
Clearly i am sure i understand what you are saying. Now this is the
scenario on the ground:
DPI ask the ICT to do a training server for them, which we had
completed and information about it had been sent to you.
Since they will be moving the server to a different location we want
the localhost to have a name so that way the clients using the server
only need that name rather than the IP address of the server.
I was reading and i found out that Nginx can do it. That is my question.
i want to replay the http://localhost:8080/dhis with maybe http://bob
for instance.
Thanks in advance
On 7/3/14, Bob Jolliffe bobjolliffe@gmail.com wrote:
Hi Gerald
There are three issues here. If you already know what i am on about then
maybe it will be helpful to others if I explain anyway:
- you can’t just pick your own ip address unless its for use on an
internal network where packets are not being exchanged with the public
internet. So inside a LAN you might use private ips in the 192.168.x.x
range or 10.x.x.x. For anything else you need to get them assigned by some
party (typically an ISP) which controls a block of them. So for example
Sierra Leone currently has just over 40000 public IP addresses assigned to
it - controlled by various ISPs. Its not that many but a big improvement
over pre-2012 I guess when there were only 8000 (
http://www.nirsoft.net/countryip/sl.html). So you would typically have one
or more public IP addresses which get routed to your MOHS router. Then its
up to you to do something on your router like reverse NAT or some other
means (port mapping?) to route packets for that ip address to and from the
actual machine within the network where your nginx (or apache) is running.
- You also can’t just pick any old name. You need to either first
register a domain with a registrar or assign a name to your machine from a
domain which you already control. So for example the domain mohs.gov.sl
should be under the control of the ministry of health of Sierra Leone (I
know its not but it should be). Then you can just map names like
hmis.mohs.gov.sl to addresses like 41.205.224.56 by creating records in
the DNS server which is authoriatative for the mohs.gov.sl domain.
It could be your IT ministry is controlling gov.sl in which case they are
the people who can give you control of mohs.gov.sl.
- Once your apache or nginx is reachable by its name then you can use it
to act as a proxy for one or more dhis tomcat servers which are running
behind it, either on the same machine or some other machine on your
internal network. So if you have a tomcat running on your machine and
listening on port 8080 then, for example, a line like the following in your
nginx configuration:
location /hmis { proxy_pass http://localhost:8080/hmis; }
is going to forward requests for http://hmis.mohs.gov.sl/hmis
Bob
On 3 July 2014 16:41, gerald thomas gerald17006@gmail.com wrote:
Dear All,
I had configure DHIS2 on ubuntu server 12.04 LTS and i had install
Ngnix because i didn’t want my clients to using
http://1.1.1.1:8080/dhis on their browsers.
Please what is the necessary configuration i should do if i want to
map that IP to a name for example http or https (http://hmis.org).
Kindly note i am using apache-tomcat.
Please i need an urgent help.
–
Regards,
Gerald
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp