@watcher666 wrote:
Hello
My config haproxy.cfg
frontend sait
bind *:7030acl hdr_sait hdr_beg(host) -i sait.ru acl status_404 status 404 http-response set-header Location https://sait.ru/ErrorPages/404_ru.html if status_404 http-response set-status 302 if status_404 acl status_5xx status 500 502 503 504 http-response set-header Location https://sait.ru/ErrorPages/503.html if status_5xx http-response set-status 302 if status_5xxacl path_4 path_beg /ErrorPages/
use_backend bknd_nginx if hdr_sait path_4
use_backend bknd_tomcat if hdr_saithow can I make sure that the correct http codes 404, 503,500 are given to a higher-standing server. And not 302 ?
I’ve been here so that only nginx does this, but the config test shows warning
frontend sait
bind *:7030acl hdr_sait hdr_beg(host) -i sait.ru acl status_404 status 404 acl status_5xx status 500 502 503 504use_backend bknd_nginx if hdr_sait status_404
use_backend bknd_nginx if hdr_sait status_5xx
use_backend bknd_tomcat if hdr_saitacl ‘status_404’ will never match because it only involves keywords that are incompatible with ‘frontend use-backend rule’
Posts: 1
Participants: 1