backend ssl-nodes
mode tcp
balance roundrobin
stick-table type ip size 10M expire 30m
stick on src
option ssl-hello-chk
server web01 77.xxx.xxx.xxx:443 check
server web02 77.xxx.xxx.xxx:443 check
server web03 77.xxx.xxx.xxx:443 check
We don’t know about angular, we cannot possibly tell what goes wrong here. You will have to do some basic troubleshooting first.
Take a look at the request between haproxy and your backend. Check your backend logs, maybe tcpdump the HTTP request and compare it with a direct and working configuration.
If you can tell what’s wrong with the request that comes from haproxy, we can help you.
It very much looks like the redirect is the problem. Note the lack of a domain name in the failed requests.
Possibly also Apache isn’t configured to the same on all the servers with regard to DirectoryIndex?
It’s very inefficient having the servers do the redirect too, why not let HAProxy do it instead. You are also inserting a cookie which seems rather pointless if you’re just redirecting.
Now, i’m sure that haproxy works OK.
I see in the VirtualHost access log file the error
IP PUB - - [03/Feb/2017:11:38:06 +0100] “GET /login HTTP/1.1” 404 711 “-” "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36"
IP PUB - - [03/Feb/2017:11:38:08 +0100] “GET /login HTTP/1.1” 404 558 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36”
The problem in on my apache or project rewrite rules.
I found the issue.
it was in apache2.conf ( AllowOverride None ) and the same variable in the VirtualHost file was configured right ( AllowOverride All ), but apache used the value in apache2.conf.