Haproxy with SSL does not work

I am trying to use the new haproxy with ssl (1.5-dev12). But I have a bug with this new feature.

I installed using:

make TARGET=linux2632 USE_OPENSSL=yes make PREFIX=/opt/haproxy-ssl install 

But when I check my configuration file, I have this error:

[ALERT] 275/135959 (10998): parsing [/opt/haproxy-ssl/haproxy.conf:31]: 'bind': the 'ssl' option is not implemented. [ALERT] 275/135959 (10998): parsing [/opt/haproxy-ssl/haproxy.conf:69]: "server" expects and [:] as arguments. [ALERT] 275/135959 (10998): Error in the configuration file: /opt/haproxy-ssl/haproxy.conf [WARNING] 275/135959 (10998): Proxy "ha_stats": in multiprocess mode, statistics will be limited to the process assigned to the current request. [WARNING] 275/135959 (10998): the statistics socket will not work correctly in multiprocess mode (nbproc> 1). [ALERT] 275/135959 (10998): Fatal error found in configuration.

And the haproxy -vv command returns:

HA-Proxy version 1.5-dev12 2012/09/10 Built without OpenSSL support (USE_OPENSSL not installed)

I do not understand why openssl is not installed, although I have no errors during installation.

OS: Debian 2.6.32-5-xen-amd64 OPENSSL: OpenSSL 0.9.8o June 1, 2010

Do you have an idea?

thanks

UPDATE:

Solved with installation:

 libssl-dev 

And then, a new make target, a new prefix and its work.

+4
source share
2 answers

Install libssl-dev before running the make command, and haproxy should work with ssl.

+7
source

You can install the latest version of 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 the OpenSSL version below,

 # openssl version 

OpenSSL 1.0.2j 26 Sep 2016

0
source

Source: https://habr.com/ru/post/1437398/


All Articles