Varnish reverse proxy appending port on URL

  • Hi there!

    (pfSense 2.2.3 with Varnish 3)

    We have an interesting problem using varnish

    We are on the process of migrating to pfSense from Microsoft TMG, one of the resources that we need is the ability to publish internal sites, the TMG already does this. basically the TMG redirects requests on port 80 based on the url to internal sites on different ports since we have more than one site on the same IIS

    On pfSense we managed to do this with Varnish, so this is an example:


    And it works, BUT one of the sites (lets say, site 1) has a menu, when clicked on this particular menu we have a session timeout, with the url appearing with the port appended, for example:

    user types

    varnish redirects to internal server on port 8081

    user access site 1 normally

    user clicks on site 1 menu


    browser now shows

    The menus in question uses # functions, the other menus and sites works fine

    We tried with Haproxy and squid reverse proxy, they worked with the same error, but on TMG it works without problems

    We suspect some kind of configuration mismatch on varnish, but we can't pinpoint where

    Any help?


  • Likely the webserver is sending url's with absolute path's specified. So better would be if it would use relative url's.. If you cant change the website then to 'fix' it you would have to rewrite the body of the replied html page's.. Haproxy cannot do that, if Varnish can i don't know..

Log in to reply