Long time lurker, first time caller...
I have a backend like
admin.mysite.com which is able to use
HTTPS (has a certificate installed, etc) - but that admin portal is a CMS backend for a number of client sites (ie.
www.clientsite.com) that are hosted on the same servers.
Everything works well here, but the problem is when a user tries to go to
https://www.clientsite.com it complains about SSL (because of the wildcard one I have installed for
*.mysite.com). I would like to figure out a way to take that request and have it redirected to HTTP instead so they do not see this certificate error.
I can't do this via SSL termination, as HAProxy decrypts the request at the load balancer level and does not pass it to the backend. Which is the only way HAProxy can read HTTP headers I believe, so the client would still see an SSL error here.
My only other thought is to try a rewrite rule in Apache - but a conditional one.
So for example
*.mysite.com can go SSL - but any other request that doesn't have that domain needs to be forced back to HTTP without seeing that pesky certificate warning.
Is this possible?