Haproxy with SSL doesn't works
Question
I trying to use the new haproxy with ssl(1.5-dev12). But I have an error with this new feature.
I've installed with:
make TARGET=linux2632 USE_OPENSSL=yes
make PREFIX=/opt/haproxy-ssl install
But when I check my config file, I've this error:
[ALERT] 275/135959 (10998) : parsing [/opt/haproxy-ssl/haproxy.conf:31] : 'bind' : 'ssl' option not implemented. [ALERT] 275/135959 (10998) : parsing [/opt/haproxy-ssl/haproxy.conf:69] : 'server' expects and [:] as arguments. [ALERT] 275/135959 (10998) : Error(s) found in configuration file : /opt/haproxy-ssl/haproxy.conf [WARNING] 275/135959 (10998) : Proxy 'ha_stats': in multi-process mode, stats will be limited to process assigned to the current request. [WARNING] 275/135959 (10998) : stats socket will not work correctly in multi-process mode (nbproc > 1). [ALERT] 275/135959 (10998) : Fatal errors found in configuration.
And the haproxy -vv command return:
HA-Proxy version 1.5-dev12 2012/09/10 Built without OpenSSL support (USE_OPENSSL not set)
I don't understand why openssl is not set though I haven't any error during installation.
OS: Debian 2.6.32-5-xen-amd64 OPENSSL: OpenSSL 0.9.8o 01 Jun 2010
Do you have an idea?
Thanks
UPDATE:
Solved with the install of:
libssl-dev
And then, new make target, new prefix and its works.
Solution
Install libssl-dev before execute the make command and haproxy with ssl should be works.
OTHER TIPS
You can install latest OpenSSL in both Centos and Ubuntu.
RHEL :
yum install -y make GCC Perl pcre-devel zlib-devel
Ubuntu :
apt-get install build-essential make g++ libssl-dev
Now,
# wget -O /tmp/openssl.tgz https://www.openssl.org/source/openssl-1.0.2-latest.tar.gz
# tar -zxf /tmp/openssl.tgz -C /tmp
# cd /tmp/openssl-*
# ./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib no-shared zlib-dynamic
# make
# make install_sw
You can check that OpenSSL version by below command,
# openssl version
OpenSSL 1.0.2j 26 Sep 2016