Forum Discussion

aaronpliu's avatar
aaronpliu
Frequent Contributor
3 years ago

How to access different environment if same domain with different IP address

Hi Community,

 

There are different test environments, i.e QAT1, QAT2, QAT3. as access constraint, only allow domain name to access with same port and no DNS in intranet network.

Currently configure domain name with IP address in hosts file, but it's hard to switch environment and allow one environment to access only

Is there anyone provided a solution? I can use curl to send http request with curl http://www.example.com --resolve www.example.com:80:127.0.0.1

How can I use ReadyAPI to access?

 

Thanks,

/Aaron

 

 

2 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Why "same domain with different IP address" so?
    • aaronpliu's avatar
      aaronpliu
      Frequent Contributor

      nmrao each environment is a cluster. In order to save resource and security, all QAT environments are using same domain name+port.

      If access via internet, then configure different port, the smart proxy can route to correct server. 

      I am trying to configure a nginx server to do so. curl is ok with its build-in functions and pure code(i.e. implement a dns server) is ok as well.

      As domain name and port are the same, even if proxy server is ok, it cannot distinguish different environment and route to correct server, that mean I have to add indicator (ie. custom header property) and configure corresponding routing rules in proxy server.

      Btw, all rest request are https, so it needs more extra processing in configuration.

       

       

      Thanks,

      /Aaron