Operating System: openSUSE Leap 15.4
KDE Plasma Version: 5.24.4
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.14.21-150400.24.81-default (64-bit)
Graphics Platform: X11
Processors: 16 × 11th Gen Intel® Core™ i7-11700K @ 3.60GHz
Memory: 125.5 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1660/PCIe/SSE2
In learning the HAProxy and following “Serve Dynamic Custom Error Pages with HAProxy”, I’m getting the error when checking the haproxy.cfg:
aproxy:/etc/haproxy/errors # haproxy -c -f /etc/haproxy/haproxy.cfg
[NOTICE] (25600) : haproxy version is 2.4.22
[NOTICE] (25600) : path to executable is /usr/sbin/haproxy
[ALERT] (25600) : parsing [/etc/haproxy/haproxy.cfg:37] : errorfile : error opening file '/etc/haproxy/errors/404.http'.
[ALERT] (25600) : Error(s) found in configuration file : /etc/haproxy/haproxy.cfg
[ALERT] (25600) : Fatal errors found in configuration.
and my permission are:
haproxy:/etc/haproxy/errors # ls -l
total 4
-rw-r--r-- 1 root root 364 Aug 15 20:58 404.http
what changes do I need to make to get this to work?
haproxy.cfg:
global
log /dev/log daemon
maxconn 32768
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats user haproxy group haproxy mode 0640 level operator
tune.bufsize 32768
tune.ssl.default-dh-param 2048
ssl-default-bind-ciphers ALL:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!PSK:!RC4:!ADH:!LOW@STRENGTH
defaults
log global
mode http
option log-health-checks
option log-separate-errors
option dontlog-normal
option dontlognull
option httplog
option socket-stats
retries 3
option redispatch
maxconn 1000
timeout connect 5s
timeout client 50s
timeout server 450s
timeout http-request 10s
listen stats
bind 0.0.0.0:80
stats enable
stats uri /monitor
stats refresh 5s
http-errors httperrors
errorfile 404 /etc/haproxy/errors/404.http
frontend kbbn7studio
bind 127.0.0.1:80
use_backend kbbn7studio if { hdr(host) -m dom kbbn7studio.kbbn-7.com }
default_backend web_servers
errorfiles httperrors
http-response return status 404 default-errorfiles if { status 404 }
backend web_servers
server kbbn7studio1 127.0.0.1:8000 check
backend kbbn7studio
server kbbn7studio 10.30.60.12:443 check