71

Apache Server 2.4 with mod_jk 1.3.7 not working for ssl (https)

Error 1:

The Apache service named reported the following error:

SSLSessionCache: 'shmcb' session cache not supported (known names: ). Maybe you need to load the appropriate socache module (mod_socache_shmcb?).

Error 2:

Faulting application name: httpd.exe, version: 2.4.4.0, time stamp: 0x512fec36 Faulting module name: mod_jk.so, version: 1.2.37.0, time stamp: 0x4fc48072 Exception code: 0xc0000005 Fault offset: 0x000000000000752d Faulting process id: 0x3580 Faulting application start time: 0x01cee6d2be493d71 Faulting application path: C:\Program Files\Apache Software Foundation\Apache2.4\bin\httpd.exe Faulting module path: C:\Program Files\Apache Software Foundation\Apache2.4\modules\mod_jk.so Report Id: f8d090fa-52c6-11e3-bce9-e4d53d737212

Our configuration for httpd_ssl.conf is as follows:

Listen 443

SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5

SSLPassPhraseDialog  builtin

SSLSessionCache        "shmcb:C:/Program Files/Apache Software Foundation/Apache2.4/logs/ssl_scache(512000)"
SSLSessionCacheTimeout  300

<VirtualHost _default_:443>

DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.4/htdocs"
ServerName 127.0.0.1:443
ServerAdmin admin@mshome.net
ErrorLog "C:/Program Files/Apache Software Foundation/Apache2.4/logs/error.log"
TransferLog "C:/Program Files/Apache Software Foundation/Apache2.4/logs/access.log"

SSLEngine on

SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.4/conf/serverssl.crt"

SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.4/conf/server.key"

SSLCACertificateFile "C:/Program Files/Apache Software Foundation/Apache2.4/conf/bundle.crt"

<FilesMatch "\.(cgi|shtml|phtml|php)$">
    SSLOptions +StdEnvVars
</FilesMatch>
<Directory "C:/Program Files/Apache Software Foundation/Apache2.4/cgi-bin">
    SSLOptions +StdEnvVars
</Directory>

BrowserMatch "MSIE [2-5]" \
     nokeepalive ssl-unclean-shutdown \
     downgrade-1.0 force-response-1.0

CustomLog "C:/Program Files/Apache Software Foundation/Apache2.4/logs/ssl_request.log" \
      "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"

</VirtualHost> 

TIA....!

Meuk Light
  • 985
  • 1
  • 7
  • 9

5 Answers5

129

In Apache2.2 following line is uncommented in apache/conf/httpd.conf by default.

LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

From Apache 2.4 above line is commented so remove the # sign before it.

This should work.

mrsus
  • 5,446
  • 4
  • 31
  • 44
  • 2
    for newbie visit [link](http://urattarde.blogspot.in/2013/11/making-website-https-using-apachehttpd.html). regarding same issues – Meuk Light Feb 03 '14 at 07:35
  • 5
    You may need to change the link of `modules/mod_socache_shmcb.so` to where the shared object lives. Mine was at `/usr/lib/apache2/modules/mod_socache_shmcb.so`. – ctbrown May 25 '15 at 15:40
  • Thanks for this answer, it saves my time – Ahmed Bermawy Feb 17 '16 at 12:30
  • I uncomment the line and the problem persists, what to do? – Fábio Zangirolami Jul 31 '16 at 12:58
  • @FábioZangirolami Are you getting the same error as OP got? Are you using Apache 2.4? – mrsus Aug 01 '16 at 10:31
  • @VarunVerma Thanks for adding the information :) Please mention your Apache version, it will be helpful for others. – mrsus Jul 07 '17 at 07:36
  • 2
    This solution got me in the right direction but didn't work exactly for my apache version (Apache/2.4.18 (Ubuntu)). I had to link the module socache_shmcb.load into mods-enabled and that resolved the problem for me. – Varun Verma Jul 10 '17 at 15:37
  • On apache 2.4.25-3+deb9u4 that line doesn't exists. You must create a symbolic link pointing to the module enabling it in `/etc/apache2/mods-enabled` this way: `ln -s ../mods-available/socache_shmcb.load socache_shmcb.load` – Miguel Ortiz Jul 31 '18 at 13:56
9

On apache 2.4.25-3+deb9u4 (Debian obviously) the line mentioned by @Mr Roshan Pawar doesn't exists. You must create a symbolic link pointing to the module and enabling it in /etc/apache2/mods-enabled this way:

ln -s ../mods-available/socache_shmcb.load socache_shmcb.load

As @ericP said it's neccesary to restart your apache, depending on your distro/config it could be:

service apache2 restart
/etc/init.d/apache2 restart
systemctl restart apache2
apache2 -k restart
Miguel Ortiz
  • 1,412
  • 9
  • 21
  • You might need to do a brutal reload after this. I tried a graceful reload (`sudo /etc/init.d/apache2 reload`) and still saw "'shmcb' session cache not supported". It worked with a `stop` and a `start`. – ericP Jul 18 '19 at 07:27
  • Thanks @ericP, that's true, it is necessary to restart, reloading will only "refresh" applied changes, in this case we are adding something "new" (which is the new module being activated) into our Apache. I've updated the answer. – Miguel Ortiz Jul 18 '19 at 13:00
4

For el capitan the path to so file is /usr/libexec/apache2/mod_socache_shmcb.so,

my entry in httpd.conf looked like:

LoadModule socache_shmcb_module /usr/libexec/apache2/mod_socache_shmcb.so
David Medenjak
  • 33,993
  • 14
  • 106
  • 134
Eugene
  • 61
  • 2
3

For Apache 2.4. at Ubuntu:

sudo a2enmod socache_shmcb
ajaaskel
  • 1,639
  • 12
  • 12
2

cp /etc/apache2/mods-available/socache_shmcb.load /etc/apache2/mods-enabled/

This will fix: SSLSessionCache: 'shmcb' session cache not supported (known names: ). Maybe you need to load the appropriate socache module (mod_socache_shmcb?).

Springhills
  • 360
  • 1
  • 5
  • 12