我在Ubuntu 14.04上安装了一个HAProxy节点版本1.5.3。 Ubuntu服务器有1个nic。 nic具有IPv6地址和IPv4地址。 IPv6在端口80上侦听传入的internet连接。 Web服务器安装在具有IPv4地址的同一VLAN中的单独Windows IIS计算机上。 没有防火墙。 从互联网上我可以连接到80端口到IPV6地址,这样很好。 HAProxy统计显示后端web服务器是好的但仍然无法通过HAPRoxy浏览IPv4服务器上的网站。 当我打开我的浏览器,我得到一个错误在IE浏览器:“HTTP 400错误请求”我重新安装Ubuntu,没有帮助。 我把头发拉出来 有人请帮忙。
这是我的configuration:
global log /dev/log local0 log /dev/log local1 notice chroot /var/lib/haproxy stats socket /run/haproxy/admin.sock mode 660 level admin stats timeout 30s user haproxy group haproxy daemon # Default SSL material locations ca-base /etc/ssl/certs crt-base /etc/ssl/private # Default ciphers to use on SSL-enabled listening sockets. # For more information, see ciphers(1SSL). # ssl-default-bind-ciphers kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL defaults log global mode http option httplog option dontlognull timeout connect 5000 timeout client 50000 timeout server 50000 errorfile 400 /etc/haproxy/errors/400.http errorfile 403 /etc/haproxy/errors/403.http errorfile 408 /etc/haproxy/errors/408.http errorfile 500 /etc/haproxy/errors/500.http errorfile 502 /etc/haproxy/errors/502.http errorfile 503 /etc/haproxy/errors/503.http errorfile 504 /etc/haproxy/errors/504.http frontend localnodes bind 0::0:80 mode http default_backend nodes backend nodes mode http balance roundrobin # option forwardfor # http-request set-header X-Forwarded-Port %[dst_port] # http-request add-header X-Forwarded-Proto https if { ssl_fc } # option httpchk HEAD / HTTP/1.1\r\nHost:localhost server web01 192.168.40.100:80 check listen stats *:1936 stats enable stats uri / stats hide-version stats auth someuser:password