I would like to enable OCSP stapling in my Apache server. I'm using:
- Server: Apache/2.4.7 on Ubuntu
- Certificate: Let's Encrypt
To the file:
/etc/apache2/sites-available/default-ssl.conf
I added:
SSLUseStapling on
Then, I edited:
/etc/apache2/mods-available/ssl.conf
adding this line:
SSLStaplingCache shmcb:/tmp/stapling_cache(128000)
I read that this would be sufficient to enable OCSP stapling.
I checked the syntax with:
sudo apachectl -t
and it was OK.
However, upon reloading, Apache can't start.
EDIT1:
Inside my SSL virtual host file:
/etc/apache2/sites-available/default-ssl.conf
I added these lines below my sets of SSLCertificateFile
, SSLCertificateKeyFile
:
SSLUseStapling on SSLStaplingReturnResponderErrors off SSLStaplingResponderTimeout 5
I then edited this file:
/etc/apache2/mods-available/ssl.conf
adding this line:
SSLStaplingCache shmcb:${APACHE_RUN_DIR}/ssl_stapling_cache(128000)
I can now restart Apache without problems, however, OCSP does not seem to be working, based upon:
openssl s_client -connect www.example.com:443 -servername www.example.com -status < /dev/null
OCSP response: no response sent
What am I doing wrong, is it something related to my Let's Encrypt certificate?
LogLevel
to see if you can get the reason it failed out of Apache. The only obvious one I can think of is if you have a firewall restricting outgoing traffic—it needs to let the OCSP request through.info
first.