Coder Social home page Coder Social logo

Comments (4)

tifayuki avatar tifayuki commented on July 26, 2024

The VIRTUAL_HOST_WEIGHTmerely has something to do with the order of HAProxy's ACL rules, which works very similar to the routing rules in IP table. Once a rule is hit, HAProxy always forward the request to the related backends. HAProxy doesn't check the response of the request and try another rules.

In your case, your last *.example.com container functions more like a response to 404, not 503.

To handle 503, you may need to check error file and errorloc here: https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-errorfile

from dockercloud-haproxy.

modius avatar modius commented on July 26, 2024

Many thanks @tifayuki that makes a lot of sense. I'll take a look at errorloc.

from dockercloud-haproxy.

modius avatar modius commented on July 26, 2024

@tifayuki can't see where I would configure errorloc as an environment variable for dockercloud/haproxy.

Am guessing that EXTRA_SETTINGS is the right environment variable to be putting this into, but can't seem to get the following to work:

EXTRA_SETTINGS=errorloc503 503 http://mysite.com/503.html

Am I on the right track?

from dockercloud-haproxy.

tifayuki avatar tifayuki commented on July 26, 2024

Yes, setting EXTRA_SETTINGS=errorloc303 503 http://mysite.com/503.html will work.

There is no errorloc503, but errorloc302 and errorloc303

from dockercloud-haproxy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.