问题原文
原帖链接 · Minh Duc Truong · CC BY-SA 4.0
I'm trying to do something like this:
- Clients send HTTP request to HAProxy.
- HAProxy does the TLS stuff to convert the request into https and forward to a server. HTTP to the client.
- The server sends https response to HAProxy, then the response is forwarded as HTTP to client.
Currently, I'm not so sure how to achieve that goal with HAProxy. I tried to create a frontend listen on a custom port and then forward to a backend server. This is my HAProxy configuration:
frontend manager_https
bind *:8443
mode tcp
log global
maxconn 2000
timeout client 50000
default_backend https_be
backend https_be
timeout connect 5000
timeout server 50000
retries 3
server rtmp-manager 127.0.0.1:12345 check-ssl verify none
Unfortunately, this does not work. When clients send HTTP request, HAProxy also forward the HTTP request to backend server, not HTTPS. How can I change the configuration to make it works as expected?
Another question: Is there any ways to make the offload transparent with client using HAProxy?
I would really appreciate any help!
已采纳解答
原帖链接 · Lacek · CC BY-SA 4.0
Specify the ssl directive in the definition of your backend server, like this:
server rtmp-manager 127.0.0.1:12345 check-ssl ssl verify none
Note that the check-ssl option affects the health checks only, and if ssl is specified, it can be omitted, since health checks are automatically done via SSL.
HAProxy should act as a transparent reverse proxy, so clients should not recognize that the requests are in fact handled by backend servers.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
