我试图通过HAProxy连接到WebDAV服务器。 目标是通过一个端口5443指引所有通信。我的HAProxy服务器通过SSL绑定到端口5443。
我曾尝试以几种不同的方式连接到WebDAV。 我可以通过https://192.168.1.200:5006在本地直接连接,如果打开端口5006,则通过https://192.168.1.200:5006直接连接。当我尝试通过HAProxy通过https://webdav.domain.com:5443或http://webdav.domain.com:5080我得到一个错误,说:“连接到服务器”webdav.domain.com“有问题。 当我尝试通过局域网连接时,会发生同样的事情。
是否有可能通过HAProxy挂载WebDAV文件系统?
下面我已经包含了我的HAProxyconfiguration文件。
global user haproxy daemon maxconn 256 log localhost user info spread-checks 10 tune.ssl.default-dh-param 2048 defaults mode http stats enable default-server inter 30s fastinter 5s log global option httplog timeout connect 5s timeout client 50s timeout server 50s timeout tunnel 1h listen stats :8280 stats uri / stats show-legends stats refresh 10s stats realm Haproxy\ Statistics stats auth admin:admin frontend http bind :5080 option http-server-close option forwardfor use_backend webdav_http if { hdr_beg(Host) -i webdav. } default_backend web frontend https bind :5443 ssl crt /usr/local/haproxy/var/crt/default.pem ciphers AESGCM+AES128:AES128:AESGCM+AES256:AES256:RSA+RC4+SHA:!RSA+AES:!CAMELLIA:!aECDH:!3DES:!DSS:!PSK:!SRP:!aNULL no-sslv3 option http-server-close option forwardfor rspirep ^Location:\ http://(.*)$ Location:\ https://\1 rspadd Strict-Transport-Security:\ max-age=31536000;\ includeSubDomains use_backend webdav_https if { hdr_beg(Host) -i webdav. } use_backend haproxy if { hdr_beg(Host) -i haproxy. } default_backend web backend web server web localhost:80 check backend webdav_https server webdav_https localhost:5006 check backend webdav_http server webdav_http localhost:5005 check backend haproxy server haproxy localhost:8280 check
HAProxy日志中的相关行
haproxy[10497]: 192.168.1.1:51676 [11/Sep/2015:18:16:56.659] https~ webdav/<NOSRV> 180/-1/-1/-1/180 503 212 - - SC-- 0/0/0/0/0 0/0 "OPTIONS / HTTP/1.1"