我已经在Ubuntu14.04上设置了一个HAProxy节点ver1.5.3。Ubuntu服务器有一个nic。nic有一个IPv6地址和一个IPv4地址。IPv6在端口80上侦听传入的incoming连接。IIS服务器安装在具有IPv4地址的同一个VLAN中的单独Windows计算机上。没有防火墙。通过互联网,我可以在80端口连接到IPV6地址,所以这很好。HAPRoxy统计数据显示后端The服务器正常,但我仍然不能通过HAProxy浏览IPv4服务器上的网站。当我打开我的浏览器时,我在IE中得到了一个错误:“HTTP400Bad请求”我重新安装了Ubuntu,没有帮助。我把我的头发拔出来了。谁来帮帮忙。
这是我的配置:
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
发布于 2019-01-24 10:51:24
尽管这是个超级古老的话题。但也许人们最终会来到这里。
现在,我正在运行一个ha proxy 1.8的实例。*我知道这是一个1.5.3实例。但今天的大多数人可能会使用1.8或更高的。
要使ipv6工作,请绑定您的前端:
bind :80 v4v6
bind :::80 v6only
您还可以使用:
bind :::80 v4v6
但在最后一种情况下,连接到它的客户端的"fowarded“ip将是::ffff:123.123.123.123,而不是123.123.123.123。
https://serverfault.com/questions/692404
复制相似问题