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 
5
  • Did the output of ./configure log anything? e.g. location of openssl libraries/headers Commented Feb 18, 2020 at 21:56
  • Why are you compiling it? Commented Feb 19, 2020 at 0: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 Commented Feb 19, 2020 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) Commented Feb 19, 2020 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. Commented Feb 19, 2020 at 15:30

3 Answers 3

3

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

1

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

yum install openssl-devel 
-1

To enable it run as root

a2enmod ssl 
3
  • a2enmod is not on my system. Commented Feb 19, 2020 at 14:45
  • @EddieRowe what is your system? Commented Feb 19, 2020 at 15:13
  • The question is about Apache webserver and OpenSSL on build-time, not on run-time. Commented Sep 28, 2023 at 0:22

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.