Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Varnish reverse proxy appending port on URL

    Scheduled Pinned Locked Moved Cache/Proxy
    2 Posts 2 Posters 738 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      fernandodx
      last edited by

      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:

      varnish-static-ip:80
      |
      site1.domain.com:8081
      site2.domain.com:8082

      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 site1.domain.com/blah

      varnish redirects to internal server on port 8081

      user access site 1 normally

      user clicks on site 1 menu

      timeout

      browser now shows site1.domain.com/blah:8081

      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?

      Thanks!

      1 Reply Last reply Reply Quote 0
      • P
        PiBa
        last edited by

        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..

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.