Hello Everyone,
I use Nextcloud with HAProxy found the problems about login and upload file.
- Sometime can’t login it seems like refresh page.
- Can’t upload file. I think also same refresh page.
If upload through backend can working normally.
Solution
- HAProxy
- Web Server 2 servers
- Database 1 server
4 NFS storage 1 server
We have mounted NFS and install nextcloud to /var/www/html/
This my config HAProxy
global
Login
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
Connection
maxconn 4096
#User / Group for run service
user haproxy
group haproxy
#Background mode
daemon
defaults
#Mode for forward http traffic
mode http
retries 3
#Log
log global
option httplog
option http-server-close
#Timeout
timeout http-request 10s
timeout queue 1m
timeout connect 5000
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
#Monitor
stats enable
stats refresh 10s
stats uri /stats
stats realm Haproxy\ Statistics
stats auth haproxy:HAPROXY
frontend http-web
#Open Port 80
bind *:80
#Header for X-Forwarded-For
option forwardfor
reqadd X-Forwarded-Proto:\ http
#Default backend
default_backend http-backend
backend http-backend
#Mode roundrobin
balance source
option httpclose
#Server Backend
server next01 192.168.4.182:80 check
server next02 192.168.4.183:80 check
Could you please recommended ?
Thank you.