OpenAM throwing 302 0 behind haproxy, nginx
Posted
by
Travis
on Server Fault
See other posts from Server Fault
or by Travis
Published on 2012-12-03T16:37:31Z
Indexed on
2012/12/03
17:06 UTC
Read the original article
Hit count: 650
I'm having some issues with my deployment and was wondering if you can help.
My set up is as follows: 2 OpenAM servers are set up behind a load balancer (HAproxy). The load balancer is set up behind two reverse proxies (nginx). The two reverse proxies are ser up behind another load balancer (haproxy). So a request will go through Haproxy > nginx > Haproxy > openam
I can access the OpenAM web console through the reverse proxies without a problem. Everything works fine at this level.
However when I access openam through the load balancer in front of the reverse proxies Openam throws a 302 error. The funny thing is however I can access the host/openam/UI/Login and login successfully. I even get the cookie and have access to my apps that are set up. However immediately after the login OpenAM throws a 302 redirect.
I'm puzzled and cannot figure out what is going wrong. Does anyone have any idea? My config files are below:
nginx config :
server {
listen 443;
server_name oamlb1;
location / {
proxy_pass http://oamlb1.mydomain.com:8080;
proxy_set_header X-Real-IP $remote_addr;
}
location /openam {
proxy_pass http://oamlb1.mydomain.com:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host oamlb1.mydomain.com:8080;
}
}
haproxy config : (This file is for the servers. The file for the reverse proxies is idenical except it points to the reverse proxies)
listen http_proxy :8090
mode http
balance roundrobin
option httpclose
option forwardfor
server webA oamserver1.mydomain.com:18080
option forwardfor
Thanks
© Server Fault or respective owner