frontend ws_frontend bind *:80 mode http default_backend ws_backend
backend ws_backend mode http option forwardfor balance roundrobin server ws_server1 your-websocket-server:port check
注意:要使用 WebSocket,必须在 ALB 上启用 HTTPS 协议。您还可以使用 SSL 证书来保护 WebSocket 连接。