简体   繁体   中英

setting up ssl on haproxy

I already have haproxy installed on an ubuntu by someone else. However looks like it's not configured with ssl.

haproxy --v

HA-Proxy version 1.5.15 2015/11/01
Copyright 2000-2015 Willy Tarreau <willy@haproxy.org>

Build options :
  TARGET  = 
  CPU     = generic
  CC      = gcc
  CFLAGS  = -O2 -g -fno-strict-aliasing
  OPTIONS = USE_POLL=default

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

Encrypted password support via crypt(3): no
Built without zlib support (USE_ZLIB not set)
Compression algorithms supported : identity
Built without OpenSSL support (USE_OPENSSL not set)
Built without PCRE support (using libc's regex instead)
Built with transparent proxy support using: IP_TRANSPARENT IP_FREEBIND

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

I also checked for the status of libssl-dev and it's installed properly.

dpkg -l libssl-dev

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                          Version                     Architecture                Description
+++-=============================================-===========================-===========================-===============================================================================================
ii  libssl-dev:amd64                              1.0.1f-1ubuntu2.8           amd64                       Secure Sockets Layer toolkit - development files

Does anyone know how i can set the ssl? Would i have to re-install this again? If yes can someone please provide me with some links to instruction to install haproxy with open_ssl set?

Thanks.

Rebuild and reinstall haproxy from source with USE_OPENSSL=yes

git clone http://git.haproxy.org/?p=haproxy-1.6.git
cd haproxy-1.6
make TARGET=linux2628 USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1
make install

Other option is to enable haproxy 1.6 ppa:

sudo add-apt-repository ppa:vbernat/haproxy-1.6

sudo apt-get update

sudo apt-get install haproxy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM