0

While trying to configure Apache to serve https with a newly installed certificate from certbot, I learned that mod_ssl isn't enabled. It's not even in the modules directory. I tried recompiling Apache with the --enable-ssl option and saw no change in the ability to use the definitions from mod_ssl. What else can I do to get mod_ssl enabled in my apache config?

I got this error when configuring:

./configure --with-included-apr --with-included-apr-util --enable-ssl --prefix=/usr/local/httpd

checking whether to enable mod_ssl... 
checking dependencies checking for OpenSSL... 
checking for user-provided OpenSSL base directory... none 
checking for OpenSSL version >= 0.9.8a... FAILED 
configure: WARNING: OpenSSL version is too old no checking whether to enable mod_ssl... 
configure: error: mod_ssl has been requested but can not be built due to prerequisite failures

I tried installing openssl and was told I was already at the highest version:

%>apt-get install openssl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
openssl is already the newest version (1.1.0l-1~deb9u1).

Some have asked about OS:

Linux toesr-instance 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64 GNU/Linux
Eddie Rowe
  • 43
  • 1
  • 5
  • Did the output of `./configure` log anything? e.g. location of openssl libraries/headers – hardillb Feb 18 '20 at 21:56
  • Why are you compiling it? – Mark Wagner Feb 19 '20 at 00:38
  • @hardillb - Ah! `checking whether to enable mod_ssl... checking dependencies` `checking for OpenSSL... checking for user-provided OpenSSL base directory... none` `checking for OpenSSL version >= 0.9.8a... FAILED` `configure: WARNING: OpenSSL version is too old` `no checking whether to enable mod_ssl... configure: error: mod_ssl has been requested but can not be built due to prerequisite failures` – Eddie Rowe Feb 19 '20 at 14:47
  • Why do you bother compiling Apache yourself? What is your OS and version, why not installing it from your OS package maintenance system? And your Apache was NOT compiled with `--enable-ssl` so you should amend your title. The log output you show (in comment, you should put it in the question) clearly states that SSL is not compiled in due to deficiencies (too old OpenSSL version) – Patrick Mevzek Feb 19 '20 at 15:05
  • I need mod_perl support for my site. Compiling Apache from source is what I found to be the reliable way to accomplish this. – Eddie Rowe Feb 19 '20 at 15:30

3 Answers3

1

After some other searching, it appears that libssl-dev was also required. Installing that and then running configure resolved the issue.

Eddie Rowe
  • 43
  • 1
  • 5
0

To enable it run as root

a2enmod ssl 
Talal Al-Khalifa
  • 668
  • 5
  • 12
0

I have same problem on CentOS 7. Install openssl-devel and compile again, problem was solved.

yum install openssl-devel
le hien
  • 1
  • 1