We are in the process of migrating from Apache reverse proxy to
HAProxy. We are facing issues with some of the web sites. Any
recommendation will be greatly appreciated.
We have hosted all application on HAProxy with the needed SSL
Certificates. All our sites are SSL, there is no non ssl site in our
e.g. https ://mysite.com is on HAProxy
https ://mysite.com should forward the request to http ://192.168.128.10:8080 on the backend. The backend i.e. 192.168.128.10:8080 is not HTTPS it is only http site. So we are proxying HTTPS site to a backend http site.
Expected behaviour (Which is not working):
When we access the site https ://mysite.com it should auto forward to login page i.e. https ://mysite.com/app1/login.jsp?/app1/ – (this autoforward is the application behavior )
When we access as https ://mysite.com/ the URL in the browser gets changed automatically to http: //mysite.com:8080/app1/login.jsp?/app1/
Since HAProxy is not listening on port 8080 the site gives error “Page cannot be displayed”
When the login page is accessed with full url i.e. https ://mysite.com/app1/login.jsp?/app1/ it loads fine, but on entering the domain only i.e. https ://mysite.com/ it ends up in “page cannot be displayed” error
This configuration is working smoothly with apache as reverse proxy, the configuration of apache is also provided below.
The HA Proxy configuration is as below
bind *:443 ssl crt /etc/pki/tls/certs/mysite/mysite.com.pem crt /etc/pki/tls/certs/mysite1/mysite1.com.pem
acl mysite.com req.hdr(Host) mysite.com
acl path_mirror_app1 path -m beg /app1
use_backend mysite.com_redirect if mysite.com path_mirror_app1
The apache configuration for the same site which is working fine is as below
SSLProtocol all -SSLv2 -SSLv3