Using URL instead of IP

swati nginx-forum at
Tue Nov 6 05:44:47 UTC 2018


I intend to use nginx as load balancer for routing traffic to an application
running on two separate Openshift (kubernetes) clusters.
The app urls are -> and
When I curl to these individually I get required page.
However, it seems, nginx resolves it into IP instead of treating it as mere
See below my config.

Since the apps are running on Openshift, they do not have a specific
(public) IP address.
Ping for (and for that matter will
give the IP of the machine where DNS service is running for that Openshift

Is there a way to configure nginx to route the requests to the URLs without
trying to resolve it into IP addresses?


upstream lbtest { 
	server ; 
	server ; 

server {
    listen 9087;
    location / {
        proxy_set_header Host $host;
	proxy_pass http://lbtest;

Posted at Nginx Forum:,281790,281790#msg-281790

More information about the nginx mailing list