# 1.5.18 HAproxy Not making backend server down

**URL:** https://discourse.haproxy.org/t/1-5-18-haproxy-not-making-backend-server-down/4128
**Category:** Help!
**Created:** [August 1, 2019, 9:39am UTC](https://discourse.haproxy.org/t/1-5-18-haproxy-not-making-backend-server-down/4128 "2019-08-01T09:39:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ivandotande](https://avatars.discourse-cdn.com/v4/letter/i/b19c9b/32.png) [@ivandotande](https://discourse.haproxy.org/u/ivandotande)
#### Post date: [August 1, 2019, 9:39am UTC](https://discourse.haproxy.org/t/1-5-18-haproxy-not-making-backend-server-down/4128/1 "2019-08-01T09:39:23Z")

</div>

currently i want HAproxy to switch to error page if the layer 7 is down. But it doesn’t do that. It will change to error file when layer 4 is down.  
Current config CentOS 6, HAproxy 1.5.18. Back end is running Cpanel.

my config file  
global  
log 127.0.0.1 local0 notice  
maxconn 25000  
user haproxy  
group haproxy  
tune.ssl.default-dh-param 2048

defaults  
log global  
mode http  
option httplog  
option dontlognull  
option httpclose  
option redispatch  
retries 2  
timeout connect 1000  
timeout client 1000  
timeout server 1000

# IF no web server available

errorfile 503 /etc/haproxy/errorfiles/sorry.http  
errorfile 400 /etc/haproxy/errorfiles/400.http

listen stats :8080  
stats enable  
stats hide-version  
stats realm Loadbalanced\ Servers  
stats uri /haproxy?stats  
stats auth admin:admin

frontend https  
bind \*:80  
bind \*:443 ssl crt /etc/ssl/certs/XXX  
redirect scheme https code 301 if !{ ssl\_fc }  
default\_backend website

backend website  
mode http  
balance roundrobin  
option httpchk  
http-check expect status 200  
http-check disable-on-404  
server web01 XXX.XXX.XXX.XXX :443 check inter 5s fall 3 rise 2 ssl verify none

it keeps showing me the following text when the error happen

 ![Screenshot%20(3)](https://us1.discourse-cdn.com/flex016/uploads/haproxy/original/1X/1413e2d99bc34c69c0f0403fc3ed0d84d5ceb2bc.png)  
 ![website](https://us1.discourse-cdn.com/flex016/uploads/haproxy/original/1X/029998272eb0a7e4f448a89605b5c82ef5530c2e.png)

---

<div class="post-metadata">

### Author: ![lukastribus](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lukastribus](https://discourse.haproxy.org/u/lukastribus)
#### Post date: [August 5, 2019, 12:32pm UTC](https://discourse.haproxy.org/t/1-5-18-haproxy-not-making-backend-server-down/4128/2 "2019-08-05T12:32:03Z")

</div>

> [@ivandotande](#):
>
> currently i want HAproxy to switch to error page if the layer 7 is down.

Elaborate what that means exactly.
