VMware NSX

  • 1.  NSX-T 3.1 Rewrite Url

    Posted Aug 04, 2022 10:16 AM

    I have create a NSX Load-Balancer and create a virtual Server with a redirect to a specific url. This works great so far....

    For example:

    http://srv01xyz.com will redirect to https://srv02xyz.com

    My question is how can i rewrite the uri so that i still get the original requested url in my browser? 

    For now i got the url for srv02.xyz.com but i want to rewrite to the origin url srv01xyz.com

    Do i have to add another rule? I tried already differend rule settings but nothing worked for me.

     

     



  • 2.  RE: NSX-T 3.1 Rewrite Url

    Posted Aug 05, 2022 09:01 AM

    Hi,

     

    Please be aware that the Native NSX load balancer is deprecated.

    I do not completely understand what you want to achieve. Is it just a rewrite from http to https ?



  • 3.  RE: NSX-T 3.1 Rewrite Url

    Posted Aug 05, 2022 10:06 AM

    No not just http -> https...

    In nginx i realized this with a reverse_proxy and proxy_pass.

    My goal is, that the url stays the origin url and does not switch to the redirected url.

    Now the behaviour in brower is:

    http://srv01xyz.com (origin url)

    redirect to:

    https://srv02xyz.com (destination url)

    but in my browser address bar i get the destination url. It should stay the origin url

    For expample

    http://srv01xyz.com/example should redirect to https://srv02xyz.com/example but in the adress bar it should stay at https://srv01xyz.com/example

    I hope this will be clear now.

    Thank you.

     



  • 4.  RE: NSX-T 3.1 Rewrite Url

    Posted Aug 05, 2022 10:58 AM

    Hi

    Not sure if nsx lb has an option of 'proxy_pass' as nginx has.
    What you could do:
    Normally what you can do is select a pool when you go to a specific URI
    i.e http://www.example.com/site1 -> pool 1 (with i.e a webserver serving this site1)
    And http://www.example.com/site2 -> pool 2 (with webserver service site2)

    The URL will stay the same, but the backend will be different.