Forum Discussion

lieweffect_3313's avatar
lieweffect_3313
Icon for Nimbostratus rankNimbostratus
Jul 18, 2018

LTM Virtual Server is https but actual web server is http

Hi,

 

I have web server which the application is running on HTTP only. On the F5, I have setup a virtual server with HTTPS port and the resource pool is point to the HTTP node.

 

The problem is when access the main page it's on https, but when login, it will prompt twice, after the second login, I can see the URL is on HTTP.

 

How do I make it all the session in HTTPS and only prompt 1 times when login.

 

Thanks

 

  • Hi,

    It is maybe because some URL in your page (Body) is an Absolute URLs. That's mean that even you use your HTTPS VS the response from server contains Absolute URLs (with URL using HTTP and not HTTPS). maybe the post of your form for authentication.

    Can you test this alternative in order to fix your problem.

    • In your HTTPS VS set a stream profil (you can set default stream profile).
    • Then create this irule and attach it to your HTTPS VS:

    Irule that allow to rewrite body in order to replace http:// by https://

    when HTTP_REQUEST {
       STREAM::disable
       HTTP::header remove "Accept-Encoding"
    }
    when HTTP_RESPONSE {
       if {[HTTP::header value Content-Type] contains "text"}{
          STREAM::expression {@http://@https://@}
          STREAM::enable
       }
    }
    

    Test this alternative and keep me in touch.

    Regards

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    Would you be able to tell us a bit about the application? It just might be possible some configuration change in that appp could make life easier for you.