Score:0

Setting up NGINX to route from IP address and port to URL

us flag

What I am trying to do is route services to local URLS based on their port numbers. For example I have a gitlab server and Postgresql server running in docker on an Ubuntu server. They are accessible via host IP:port but I want to be able to specify, let's say gitlab-server/ for gitlab server and postgresql for the postgresql server. I installed nginx but I'm not sure how to set that up?

The URL's will only be accessible within my network. Any advice, suggestions will be greatly appreciated.

Current Behavior:

-- xx.xx.xx.xx is the UBUNTU server so the same IP address for each service just different ports.

http://xx.xx.xx.xx:4080/ -> gitlab

http://xx.xx.xx.xx:5432/ -> postgresql

http://xx.xx.xx.xx:9000/ -> portainer

This is what I am trying to achieve:

http://gitlab-server/ --> http://xx.xx.xx.xx:4080/

http://postgresql/ --> http://xx.xx.xx.xx:5432/

http://portainer/ --> http://xx.xx.xx.xx:9000/

Score:0
us flag

You cannot use http:// scheme to access PostgreSQL. PostgreSQL has its own protocol that is not compatible with HTTP.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.