Comments (4)
The VIRTUAL_HOST_WEIGHT
merely 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.
Many thanks @tifayuki that makes a lot of sense. I'll take a look at errorloc
.
from dockercloud-haproxy.
@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.
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)
- Unnecessary redirect from https to https scheme in SSL termination mode HOT 2
- TCP load balancing doesn't work in Docker Swarm Mode
- Basic auth on a single service? HOT 2
- DNS resolution of loggers at startup
- Still experimental in Swarm Mode? HOT 8
- You should be able to indicate explicit Service/Port combos.
- Source balancing does not work on Docker for Mac
- Some question about multi-ports balance and ADDITIONAL_SERVICES
- Is this project dead? HOT 16
- How can i achieve the desired result with NGINX? Anybody else knows?
- Not working properly when using compose mode + service with fixed container names HOT 1
- Swarm service deploy mode = global is not supported
- Put stats on Virtual Host on a port 80 / 443
- Service Unavailable (503) Custom HTML
- Support option for this application
- We have a requirment of altering url for backend service at haproxy, how can we achieve
- tcp的1m超时怎么解决
- Questions about the mysterious project deprecation HOT 1
- imcompatible with docker compose 1.23 HOT 5
- Can not link service or container in compose mode HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockercloud-haproxy.