问题
lately i setup my Haproxy server and now randomly 401 Error (File not found) errors occure. And when restarting Haproxy it works for around 10 minutes and than it again happens. Than you can spam F5 and every 3. Page just shows "File not found."
OS: Archlinux
I will just send the config in here, maybe something is wrong with it:
global
maxconn 20000
#log /var/log/ local0
log /dev/log local0 info
user haproxy
chroot /usr/share/haproxy
pidfile /run/haproxy.pid
daemon
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5s
timeout client 50s
timeout server 50s
userlist auth-list
group is-admin
user [REMOVED] password [REMOVED] groups is-admin
frontend site
bind :80
mode http
log global
stats enable
stats uri /haproxy?stats
stats realm Strictly\ Private
stats auth [REMOVED]
option httplog
option dontlognull
option http-keep-alive
option http_proxy
option forwardfor
timeout client 300s
acl url_static path_end -i .woff .ico .swf .svg .ttf .jpg .gif .png .css .js
use_backend site_cdns if url_static
use_backend site_phpservers
default_backend site_phpservers
errorfile 503 /etc/haproxy/errors/503.http
errorfile 401 /etc/haproxy/errors/401.http
backend site_cdns
mode http
balance roundrobin
timeout connect 300s
timeout server 300s
timeout queue 300s
option redispatch
cookie CPG insert
server [REMOVED] cookie SB check
backend site_phpservers
mode http
balance roundrobin
timeout connect 5s
timeout server 30s
timeout queue 30s
option redispatch
cookie CPG insert
use-fcgi-app site_fpmsettings
server [REMOVED] cookie SA proto fcgi check
fcgi-app site_fpmsettings
log-stderr global
docroot /site
index index.php
path-info ^(/.+\.php)(/.*)?$
来源:https://stackoverflow.com/questions/65756849/haproxy-random-http-401-errors-file-not-found