2011-08-01 48 views

回答

2

errorfile关键字在配置中可以用于此:

errorfile 503 /etc/haproxy/errors/503.http 

哪里503.http是一样的东西:

HTTP/1.0 503 Service Unavailable^                      Cache-Control: no-cache 
Connection: close 
Content-Type: text/html 

<html><body><h1>503 Service Unavailable</h1> 
Sorry, no server is available to handle this request. 
</body></html>