Articles of haproxy

使用允许为分布式stream量的多个Apache服务器encryptionSSL

我正在设置一些问题让我们encryption两个不同的服务器上设置的几个网站,并通过HAProxy分配给他们的stream量。 服务器上有一些VHosts /域,所有这些都需要SSL证书。 为了这篇文章,可以说他们是: foo.some-site.com bar.some-site.com 这两个Alogging都设置了两个IP地址。 我可以用nwtools.com或者nslookup进行validation,Aloggingfoo.some-site.com和bar.some-site.comparsing相同的两个IP地址。 而且我知道Let's Encrypt要求vhost有一个有效的logging,所以可以进行查找。 我计划在两台服务器上运行所有虚拟主机的Lets Encrypt安装程序,并且对其中一个虚拟机运行正常,但是当我转到第二个时,出现错误: [root@server httpd]# /opt/letsencrypt/letsencrypt-auto –apache -d foo.some-site.com Checking for new version… Requesting root privileges to run letsencrypt… /root/.local/share/letsencrypt/bin/letsencrypt –apache -d foo.some-site.com Failed authorization procedure. foo.some-site.com (tls-sni-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Failed to connect […]

什么是默认的ha-proxy负载均衡algorithm?

当我configuration一个代理服务器,它是在Ubuntu服务器上的ha代理,我忘了在haproxy.cnf文件中select一个平衡选项,但窃取工作正常,任何人有一个想法什么algorithm运行?

无法启动haproxy

使用Ubuntu作为我的服务器我试图设置负载平衡使用HAProxy。 当我尝试使用“haproxy -f haproxy.cfg”运行时出现此错误。 [警告] 035/115820(1148):[haproxy.main()]无法将FD限制提高到8224. [ALERT] 035/115820(1148):启动代理webservice:无法绑定套接字 我认为释放port80可以解决问题,所以我卸载了可能使用port80的apache2。 但无济于事依然没有解决我的问题。 那么我怎样才能杀死一个使用80端口的应用呢? 我的haproxy.cfg # this config needs haproxy-1.1.28 or haproxy-1.2.1 global log 127.0.0.1 local0 log 127.0.0.1 local1 notice #log loghost local0 info maxconn 4096 #chroot /usr/share/haproxy user haproxy group haproxy daemon #debug #quiet defaults log global mode http option httplog option dontlognull retries 3 option redispatch […]

为什么第7层负载均衡器configuration不需要任何客户端configuration更改?

例如,对于haproxy (第7层)负载均衡,您只需要configurationVIP(即集群IP)后面的“真实服务器”或“后端”。 例如: listen smtp 192.168.3.10:25 mode tcp balance roundrobin server smtp1 192.168.3.1:25 check server smtp1 192.168.3.2:25 check 但是,对于lvs (第4层),我需要: 设置lvs机为路由器,实现“NAT路由” lvs机器和后端拥有在后端configuration了一些ARP mod的VIP 第7层负载平衡如何在没有更多涉及的configuration的情况下做到这一点? 我在这里误解或错过了一些根本性的东西吗?

基于源IP(IP子网)的HAProxy负载平衡

我有x集群。 这个集群看起来像 Cluster 1 192.168.1. (Server type 1) 192.168.2. (Server type 2) 192.168.3.1 (Server type 3) <Redis server> Cluster 2 192.167.1. (Server type 1) 192.167.2. (Server type 2) 192.167.3.1 (Server type 3) <Redis server> 目前我正在代码中pipe理群集组configuration。 是否有可能有一个域名为使用haproxy而哪个redirect需要基于源IP? 例如 192.167.* request gets redirect to 192.167.3.1 和 192.168.* request gets redirect to 192.168.3.1

在haproxy.cfg中导入configuration文件

我在haprox.cfg有近200行ACLconfiguration,还包含150个后端。 为了消除这种configuration的复杂性,我想把这个configuration绑定在单独的文件中,并将这些文件导入到haprox.cfg 。 这在haproxy中可能吗?

haproxy BADREQ错误

我在我的haproxy日志中看到类似于以下的错误: Jul 18 17:05:30 localhost haproxy[8247]: 188.223.50.7:51940 [18/Jul/2011:17:05:24.339] http_proxy_ads http_proxy_ads/<NOSRV> -1/-1/-1/-1/6001 408 212 – – cR– 100/89/0/0/0 0/0 "<BADREQ>" Jul 18 17:05:30 localhost haproxy[8247]: 188.223.50.7:51943 [18/Jul/2011:17:05:24.341] http_proxy_ads http_proxy_ads/<NOSRV> -1/-1/-1/-1/6000 408 212 – – cR– 99/88/0/0/0 0/0 "<BADREQ>" 等等… 到目前为止,我试图增加客户端超时(从3秒到6秒),并将http请求缓冲区从16k增加到32k。 错误仍然出现。 任何人都可以给我指导在这里寻找什么?

如何configurationHAProxy通过端口路由而不使用多个前端或侦听器

我正在尝试为在同一IP上的多个端口上运行的Jabber连接configurationHaproxy v1.5。 为了保持configuration尽可能简单,我想使用一个前端和一个或多个后端。 有没有办法让我通过源端口后端或使用ACL路由到不同的后端基于端口? frontend Jabber_IN bind 10.60.0.12:5222 name port5222 bind 10.60.0.12:5223 name port5223 bind 10.60.0.12:9090 name port9090 bind 10.60.0.12:9091 name port9091 bind 10.60.0.12:7070 name port7070 bind 10.60.0.12:7443 name port7443 bind 10.60.0.12:5229 name port5229 mode tcp option tcplog option tcpka timeout client 60m timeout server 60m timeout http-keep-alive 1m default_backend Jabber backend Jabber tcp-check connect […]

haproxy可以用来平衡unix套接字吗?

在nginx中,configuration它来代理unix .sock文件是相当简单的 例如: upstream bla { server unix:///home/sam/Source/bla/tmp/sockets/thin1.sock; server unix:///home/sam/Source/bla/tmp/sockets/thin2.sock; } 在haProxy中是否有类似的语法来平衡本地.sock filew

如何在haproxy级别redirect请求以从CDN获取文件?

对于给定的url模式,我希望从CDN中获取文件的内容,而不是从我的web服务器中获取。 例: www.example.com/some/path/ford/new?a=1&b=2 我需要提取: 福特新1 2 我想从s3(或CDN)中获取文件,如: example-com.s3.com/customers/ford.new.1.2.html 这可能在HAProxy级别,或者我必须以某种方式在nginx中做到这一点? 在pipe道越早越明显。