15

I'm running (trying to run, actually) Apache 2.4.2 on Windows Server 2003 R2 32 bit (plus PHP 5.4.5 and OpenSSL 1.0.1c, but I don't think that matters), and I'm getting the following line in the error log:

[Sun Aug 05 11:52:39.546875 2012] [ssl:warn] [pid 5712:tid 348] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]

Trying to connect to https://localhost/ gets a 102 - Connection refused error.

What puzzles me is that SSLSessionCache is configured:

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

It's exactly the same line of the configuration file I had for Apache 2.2.17 (except for /Apache2.2 instead of 2.4), which runs just fine. Using mod_status, I'm getting no informations for "SSL/TLS Session Cache Status", while I do for Apache 2.2.

I don't think there are many differences between the two httpd-ssl.conf files, mainly between paths, but it seems they're all right.

The virtual server on port 80 runs okay.

What am I missing?

Edit: for those who are wondering, this isn't the misleading warning that someone got when the machine couldn't resolve the ServerName. Apache 2.2 has no problem with it, and I even flushed the DNS cache with netstat /flushdns.

MaxArt
  • 515
  • 1
  • 7
  • 14

7 Answers7

12

The culprit wasn't found in http-ssl.conf, but in httpd.conf.

I suspected that when I saw that the server status wasn't reporting the "SSL/TLS Session Cache Status" section at all, rather than an empty section. It happened that the Include directive in httpd.conf pointed to an old test .conf file instead of httpd-ssl.conf.

Well, duh! This may help other newbies like me in the future...

MaxArt
  • 515
  • 1
  • 7
  • 14
  • 1
    nice one! this help we with getting apache back on track after upgrading to high sierra – stefan Dec 18 '17 at 10:27
  • What about completely forgetting to uncomment the appropriate `Include` directive, like I did, and was very surprised why the file was never loaded? I 'out-newbied' you! (note: the first time I tinkered with Apache was... back in 1995, when it was first developed!) – Gwyneth Llewelyn Nov 22 '18 at 18:34
2

I was also having the same issue but it is fixed now.

I tried running the command "netsh winsock reset" in command prompt and restarted my machine.

Problem was.. installed skype recently and after the installation both apache and skype were looking for same port 80. Even if you change the port number for skype it was not working... might be becos of some cache in windows. After changing the port number for skype and running this command it worked for me.

sowmithrii
  • 21
  • 1
1

I tried all the above mentioned solutions and nothing worked in my case. Finally I realized that problem is caused due to "shmcb" which basically refers to apache socache_shmcb module. This was disabled in my httpd.conf and enabling it solved the issue.

Therefore, to resolve this problem uncomment the following line in your httpd.conf:

LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
bjoster
  • 4,423
  • 5
  • 22
  • 32
sumitrke
  • 11
  • 1
1

I spent more time than I would have liked on a similar issue, so here's my case with the fix.

Was getting this error message in the logs:

Init: Session Cache is not configured [hint: SSLSessionCache]

After fumbling through ssl.conf (which was actually NOT enabled) and paths mentioned in it, turned out that ssl.load (as a symlink) was in /etc/apache2/mods-enabled/ as expected, but that the matching .conf file was not. Easy to check with:

ls -al /etc/apache2/mods-enabled/ | grep ssl

The fix was very simple. Instead of trying to enable things by hand, just use a2enmod. So to enable SSL with it, simply:

a2enmod ssl
Fabien Snauwaert
  • 251
  • 1
  • 3
  • 9
0

I am adding this answer as the question is already a bit older and it took me one hour of my life and I was almost freaking out.

Even this post explains restart is a stop and start SLES 15.1 behaves apparently different:

restart doesn't reload the settings in /etc/sysconfig/apache2!

To be really sure don't use apachectl restart. These are now the steps to configure the SSLSessionCache:

  1. a2enflag SSL
  2. apachectl stop
  3. apachectl start

And check then the log file.

Peter VARGA
  • 332
  • 1
  • 2
  • 15
0

Could also be that you have a mismatch between server name and ssl cert. Then it looks in apache/error-log like: server certificate does NOT include an ID which matches the server name.

dr0i
  • 231
  • 1
  • 11
0

In my case it generated this error because there was some process in windows using port 443 of ssl. Try to disable non-windows services. And removing from automatic startup.