haproxy site returns 404 on every other refresh...



  • Hi all

    I've had a pfsense server running haproxy for a while now with no problems. Until now. I have one particular website, it's running on IIS 8 (Windows Server 2012 R2). I now have a simple html page on it that says nothing more than "hello", this loads the first time I attempt it from the internet. But then if I hit refresh I get error 404. Another refresh and it loads again, and another.... another 404. I've tried waiting for various intervals for the refresh but the pattern remains the same - loads, 404, loads, 404, etc.

    No special configuration here. 1 WAN, 1 LAN, running Squid for proxy and HAproxy for reverse proxying. Both backend and frontend are bog standard basic, nothing special about their configurations.

    This site worked fine on a VERY old TMG server previously, and it works fine on the internal network, so I'm convinced it's a pfsense / haproxy configuration issue. The only other potential I can think of is that this site also hosts a .net application, maybe I'm missing something for that in HAproxy or IIS? Anyone have any ideas or experience?

    Cheers!



  • @davidbrowett
    Strange.. Do you have 2 frontends binding to the same port, that could give alternating results..
    Or 2 haproxy processes running? (with possibly different configs in memory if one is to old and still accepting new connections)
    Also enable haproxy log's check what it says there for each request?

    Can you share your haproxy.cfg , it can be seen at the bottom of the haproxy settings tab.



  • Hi PiBa, and thanks for the response. Would you believe, I have just managed to get it going. Interesting one, IIS site was missing a binding for that particular host header. Strange that it didn't work considering that it's the only site on that server and it was listening on the right port, etc, but it has made the difference to it! Lesson learned!