Unix OS
--
Questions
--
Followers
Top Experts
I have gotten a working ssl certificate, but I am unable to to get haproxy to work with the sites.
here is the config i have been using:
global
daemon
maxconn 4096
defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend http-in
bind *:80
acl is_site1 hdr_end(host) -i server1.domain.com
acl is_site2 hdr_end(host) -i server2.domain.com
use_backend site1 if is_site1
use_backend site2 if is_site2
backend site1
balance roundrobin
option httpclose
option forwardfor
server s2 192.168.0.252:80 maxconn 32
backend site2
balance roundrobin
option httpclose
option forwardfor
server s1 192.168.0.246:80 maxconn 32
Any help would be appreciated.
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Never used this haproxy, but ssl will transport over https and port 443.
Perhaps you want to configure your settings to reflect that.
HTH.
Cheers, JP.
Thanks for your reply, I have tried just changing those two settings, but unfortunately it didn't work.
The browsers the popup with a SSL error.
Oh, OK.
What is the error you get when using the browser?
Can I assume that the 'http-in' changes to 'https-in' and binds to 443. I guess somewhere you'll have to mention the ssl cert in the config.
I've configured IBM WebSEAL reverse proxy and that was over ssl. It was a couple of years ago now. Can you verify that your haproxy process is listening on 443?
Cheers, JP.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
When using the following config:
frontend https-in
bind *:443
acl is_site1 hdr_end(host) -i server1.domain.com
acl is_site2 hdr_end(host) -i server2.domain.com
use_backend site1 if is_site1
use_backend site2 if is_site2
When you then try to access https://server1.domain.com my browser pops out the following error:
Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have.
Error code: ERR_SSL_PROTOCOL_ERROR
SSL PROTOCOL ERROR means you use SSLv3 which is broken or very short DH parameter, or very short key.
hpps.co.za
and
soft-solutions.co.za
getting the same error at both sites

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Since sites are different and will have different SSL keys I suggest you do with apache-worker or apache-event reverse proxy. HAProxy does not do SNI.
I have tried to follow this: http://blog.haproxy.com/2012/04/13/enhanced-ssl-load-balancing-with-server-name-indication-sni-tls-extension/
Have you perhaps have a brief howto on how to get this accomplished in with apache on FreeBSD? I have done reverse proxy with apache in the past, but once again i am completely ignorant as to how to accomplish this with SSL.
thank you
Sorry, are you saying that you are now not using haproxy?
This reference http://blog.haproxy.com/20
In SSL offloading mode
In this mode, HAProxy is the SSL endpoint of the connection.
It’s a simple keyword on the frontend bind directive:
1 bind 10.0.0.1:443 ssl crt /path/to/cert.pem no-sslv3
In SSL forward mode
In this mode, HAProxy forwards the SSL traffic to the server without deciphering it.
We must setup an ACL to match the SSL protocol version, then we can refuse the connection. This must be added in a **frontend** section:
1 bind 10.0.0.1:443
2 tcp-request inspect-delay 2s
3 acl sslv3 req.ssl_ver 3
4 tcp-request content reject if sslv3
If I'm barking up the wrong tree, just throw me a stick!
Cheers, JP.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
https://help.knthost.com/nginx/nginx-reverse-proxy-setup-freebsd
I guess the key objective for you is the SSL. That being so, you'll need to define your SSL detail in either config; it seems that this is your sticking point...
Just to cover all bases; do you have a valid signed or self-signed certificate? When you connect over https a browser expects to see one presented.
Good luck hey!
Cheers, JP.
thanks

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Sounds like you have been successful. Well done!
Cheers, JP.






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Unix OS
--
Questions
--
Followers
Top Experts
Unix is a multitasking, multi-user computer operating system originally developed in 1969 at Bell Labs. Today, it is a modern OS with many commercial flavors and licensees, including FreeBSD, Hewlett-Packard’s UX, IBM AIX and Apple Mac OS-X. Apart from its command-line interface, most UNIX variations support the standardized X Window System for GUIs, with the exception of the Mac OS, which uses a proprietary system.