Dear Aleks, Bryan, Igor and Willy,
Thank you Aleks and Igor for your domain rewrite insights and Bryan and
Willy for your basic configuration guidance in the last few weeks. Your
insights and a few Web articles helped us achieve the following milestones:
1) A working reverse proxy load balancing deployment of HAProxy.
2) Access a product while employing reverse proxy by sub-directory.
Your efforts culminated into a HAProxy configuration that is given below
for your and other users review, modification and use.
Also, if you are a blog writer, please feel free to post it as your blog
for other's benefit and quicker adoption of HAProxy.
Your guidance has been important and relevant to us as HAProxy, Varnish,
Keepalived / Heartbeat and Pound implementations will be the corporate
sentinel of our private cloud infrastructure that customers access.
This corporate infrastructure will help in our journey to IPO. Your
encouraging and timely help propelled us faster towards this goal.
Thank you.
Additional Web articles that helped us:
i. Baptiste Assman:
http://blog.haproxy.com/2014/04/28/howto-write-apache-proxypass-rules-in-haproxy/
ii. Waldner:
http://backreference.org/2012/04/25/load-balancing-and-ha-for-multiple-applications-with-apache-haproxy-and-keepalived/
===========
HAProxy configuration for reverse proxy by Sub-directory
===========
global
[....]
defaults
[....]
frontend webapps-frontend
bind *:80 name http
bind *:443 name https ssl crt /path/to/server.pem
log global
option forwardfor
option httplog clf
http-request add-header X-Forwarded-Proto https if { ssl_fc }
acl host_https req.hdr(Host) <FQDN>:SSL_FORWARDED_Port # Port
not required if there is no port forwarding
acl path_subdomain_p2 path_beg -i /Product2
use_backend subdomain_p2-backend if host_https path_subdomain_p2
backend subdomain_p2-backend
acl hdr_location res.hdr(Location) -m found
rspirep ^(Location:)\ (http://)(.*)$ Location:\ https://\3 if
hdr_location
server Product2.VM0 <internal_IPxx.yy.zz.ww:APPLICATION_PORT>
cookie c check
Thank you.
Sincerely,
-- --
Susheel Jalali
Coscend Communications Solutions
susheel.jal...@coscend.com
www.Coscend.com