What is the SSL session cache, and how do I configure it?

For HTTPS connections, negotiating SSL session parameters is relatively complex. These parameters are reused within a single worker thread, but multiple parallel requests from a browser are likely to be routed to different workers. An SSL session cache allows the session parameters to be shared across workers.

As of May 29, 2018, the SSL session cache is enabled by default on newly ordered proServers for both Nginx and Apache. For older proServers, the configuration can be adjusted as follows.

Nginx

In the line

ssl_session_cache shared:SSLvpro<VPRO_NUMMER>:5m;

Replace the placeholder <VPRO_NUMBER> with the corresponding proServer number and add it to the configuration file /usr/local/etc/vhosts/ssl.conf:

server {
  listen 443 ssl default_server;
  listen [::]:443 ssl default_server;

  server_name vpro001.proserver.punkt.de;

  ssl_certificate /usr/local/etc/ssl/certs/vpro001.proserver.punkt.de/fullchain.pem;
  ssl_certificate_key /usr/local/etc/ssl/certs/vpro001.proserver.punkt.de/privkey.pem;
  ssl_session_cache shared:SSLvpro001:5m;
  ...
}

Then restart Nginx:

sudo service nginx restart

For more information, see the Nginx documentation.

Apache 2.4

The lines

SSLSessionCache "shmcb:/var/run/ssl_scache(5120000)"
SSLSessionCacheTimeout 300

Add the following to the /usr/local/etc/apache24/modules.d/090_mod_socache_shmcb.conf configuration file:

LoadModule socache_shmcb_module libexec/apache24/mod_socache_shmcb.so

SSLSessionCache "shmcb:/var/run/ssl_scache(5120000)"
SSLSessionCacheTimeout 300

Then restart Apache 2.4:

service apache24 restart