HA代理配置

时间:2018-08-29 06:13:02

标签: configuration haproxy missing-features

我想为服务器配置反向HAProxy。我正在检查HAProxy的版本,但我意识到它不像其他人那样显示信息构建openssl。缺少的部分显示在下面。我已经安装了openssl,所以我在这里错过了其他哪些步骤?

 Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT 
 IP_FREEBIND
 Built with OpenSSL version : OpenSSL 1.0.2p  14 Aug 2018
 Running on OpenSSL version : OpenSSL 1.0.2p  14 Aug 2018

我的显示: haproxy -vv

 HA-Proxy version 1.8.13 2018/07/30
 Copyright 2000-2018 Willy Tarreau <willy@haproxy.org>

 Build options :
 TARGET  = linux2628
 CPU     = generic
 CC      = gcc
 CFLAGS  = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -fno-strict-overflow -Wno-unused-label
 OPTIONS =

Default settings :
maxconn = 2000, bufsize = 16384, maxrewrite = 1024, maxpollevents = 200

Built with network namespace support.
Built without compression support (neither USE_ZLIB nor USE_SLZ are set).
Compression algorithms supported : identity("identity")
Built without PCRE or PCRE2 support (using libc's regex instead)
Built with multi-threading support.
Encrypted password support via crypt(3): yes
Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT 
IP_FREEBIND

Available polling systems :
epoll : pref=300,  test result OK
poll : pref=200,  test result OK
select : pref=150,  test result OK
Total: 3 (3 usable), will use epoll.

Available filters :
    [TRACE] trace
    [COMP] compression
    [SPOE] spoe

1 个答案:

答案 0 :(得分:0)

显然您缺少编译选项:

USE_OPENSSL = 1 SSL_INC = / path / to / ssl / include SSL_LIB = / path / to / ssl / lib

我用

编译
make TARGET=linux2628 USE_OPENSSL=1 SSL_INC=/path/to/include SSL_LIB=/path/to/lib

和我的“构建”选项如下

Build options :
  TARGET  = linxu2628
  CPU     = generic
  CC      = gcc
  CFLAGS  = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -fno-strict-overflow -Wno-unused-label
  OPTIONS = USE_POLL=default USE_OPENSSL=1

如果看到USE_OPENSSL = 1,则应该看到有关openssl版本的缺失部分