• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here: Home » Apache 2.4 OCSP Stapling : Optimization & Error Prevention

By Abhishek Ghosh June 23, 2017 8:18 pm Updated on June 23, 2017

Apache 2.4 OCSP Stapling : Optimization & Error Prevention

Advertisement

In previously published guide we talked about basic steps to enable OCSP Stapling on Apache. That is the maximum you’ll get on most of the websites on this earth. It is not abnormal to face odd error with OCSP Stapling. Most websites advice to fix them somehow. Here is a complete guide on Apache 2.4 OCSP Stapling optimization & error prevention.

Apache 2-4 OCSP Stapling Optimization & Error Prevention

 

Apache 2.4 OCSP Stapling Error Prevention

 

You must give attention to /var/log/apache2/error.log or whatever your error log file location is. Additionally you should regularly check the front end pages. Many modules are often not enabled. At this moment, the required modules has no bug for Ubuntu 2.4 but needs proper installation. Under next subheader we are describing optimisation which automatically will fix most common errors which commonly are not properly configured.

 

Apache 2.4 OCSP Stapling Optimization

 

This is an example virtual host file with OSCP Stapling and other modern things :

Advertisement

---

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<IfModule mod_ssl.c>
SSLCryptoDevice dynamic
SSLStaplingCache shmcb:/etc/apache2/stapling_cache(256000)
SSLSessionCache shmcb:/etc/apache2/ssl_gcache_data_shmcb(1024000)
## SSLSessionCache dbm:/etc/apache2/ssl_gcache_data_dbm
SSLSessionCacheTimeout  300
Mutex                   file:/etc/apache2/ ssl-cache
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLPassPhraseDialog  builtin
<VirtualHost *:443>
           ServerName example.org
           ProtocolsHonorOrder On
           Protocols http/1.1 h2
           ServerAdmin admin@example.org
           DocumentRoot /var/www/html
           ErrorLog ${APACHE_LOG_DIR}/error.log
           CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/ssl/private/public.crt
SSLCertificateKeyFile /etc/ssl/private/private.key
SSLCertificateChainFile /etc/ssl/private/intermediate.crt
SSLOpenSSLConfCmd DHParameters "/etc/ssl/private/dhparams_4096.pem"
SSLOCSPEnable on
SSLUseStapling on
SSLOCSPResponseMaxAge 900
SSLOCSPResponseTimeSkew 300
SSLStaplingReturnResponderErrors off
SSLStaplingErrorCacheTimeout 60
SSLOpenSSLConfCmd ECDHParameters secp384r1
SSLOpenSSLConfCmd Curves secp521r1:secp384r1
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomainsi; preload"
Header always set X-Content-Type-Options nosniff
Header always set X-Frame-Options SAMEORIGIN
Header edit Set-Cookie ^(.*)$ $1;HttpOnly;Secure
Header always set Public-Key-Pins 'pin-sha256="snqzW9Bwdb/++vjcA36+kbP/qaVMmnB9ckuI3qAkihQ="; pin-sha256="BJKSF/6L2QXz4xK6MVj2RTiyPlFzQx3NcpuxnuqdABk="; max-age=5184000; includeSubDomains'
Header set X-XSS-Protection "1; mode=block"
Header set Expect-CT "enforce; max-age=3600"
Header set Referrer-Policy "origin"
FileETag None
Header add Link "</wp-content/plugins/crayon-syntax-highlighter/js/min/crayon.min.js>; rel=preload; as=script; x-http2-push-only"
Include /etc/letsencrypt/options-ssl-apache.conf
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/html>
        Options FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>
</IfModule>
 
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

You can see that there are lot of directives related to OSCP Stapling and cache. shmcb and dbm are two keywords which many has not much idea. On Apache, primary modules involved in key-value caching are mod_socache_dbm, mod_socache_dc, mod_socache_memcache, mod_socache_shmcb, and supporting modules are mod_authn_socache,mod_ssl.

mod_socache_dbm backend uses a file-based key-value store. This can suffer from some memory leaks. mod_socache_shmcb is better. mod_socache_shmcb is possibly the best option for key-value caching. mod_socache_dc has not been updated in last 13 years. You can see the commented out line in the above configuration :

Vim
1
## SSLSessionCache dbm:/etc/apache2/ssl_gcache_data_dbm

We kept for you to test. You can see in the config OSCP and OSCP stapling related directives :

Vim
1
2
3
4
5
6
SSLOCSPEnable on
SSLUseStapling on
SSLOCSPResponseMaxAge 900
SSLOCSPResponseTimeSkew 300
SSLStaplingReturnResponderErrors off
SSLStaplingErrorCacheTimeout 60

Usually the above mentioned modules are either not installed or not activated. Run this command :

Vim
1
a2enmod authz_core authz_host access_compat socache_shmcb slotmem_shm socache_dbm

On already enabled system, response will be :

Vim
1
2
3
4
5
6
7
8
9
10
11
shmcb slotmem_shm socache_dbm
Module authz_core already enabled
Considering dependency authz_core for authz_host:
Module authz_core already enabled
Module authz_host already enabled
Considering dependency authn_core for access_compat:
Module authn_core already enabled
Module access_compat already enabled
Module socache_shmcb already enabled
Module slotmem_shm already enabled
Module socache_dbm already enabled

Apache has huge documentation :

Vim
1
https://httpd.apache.org/docs/trunk/socache.html

With configuration like we gave example, run :

Vim
1
2
apachectl -t
sudo systemctl restart apache2.service

You should not receive error and there will be marginal optimisation of page loading speed.

Tagged With ocsp stapling not enabled apache

This Article Has Been Shared 773 Times!

Facebook Twitter Pinterest
Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Apache 2.4 OCSP Stapling : Optimization & Error Prevention

  • Application Service Provider (ASP) and Cloud Computing

    Application Service Provider or ASP is a service of an application for exchanging information over a public network and is used over PaaS now as SaaS.

  • Cloud Computing Agility : The Converged Technologies

    Cloud Computing Agility is a characteristic feature of Cloud which allows to gain the speed in development and deployment of applications and Services.

  • Platform as a Service (PaaS) : A Detailed Article

    Platform as a Service (PaaS) refers to a service in the cloud a computing platform is for developers of Web applications without buying hardware and software.

  • Data on Cloud and Legal Fog Around

    Data on Cloud has some unclear spots like in case when the provider operate not under same nations law, but law of a foreign jurisdiction, that can add issues.

  • Cloud Computing for SMBs : Path to the Cloud

    In any case, the turn to cloud for medium to small business means a change in the operating models. But what are the necessary steps to achieve that?

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (21K Followers)
  • Twitter (5.3k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Fix Missing/Bad FileProvider for Freshchat (Android error code 354) March 3, 2021
  • Basics of Data Protection on the Internet March 2, 2021
  • What is Standard Software February 28, 2021
  • WordPress Link to text Fragment February 27, 2021
  • How to Protect IP Cameras From Hackers February 25, 2021

 

About This Article

Cite this article as: Abhishek Ghosh, "Apache 2.4 OCSP Stapling : Optimization & Error Prevention," in The Customize Windows, June 23, 2017, March 3, 2021, https://thecustomizewindows.com/2017/06/apache-2-4-ocsp-stapling-optimization-error-prevention/.

Source:The Customize Windows, JiMA.in

 

This website uses cookies. If you do not want to allow us to use cookies and/or non-personalized Ads, kindly clear browser cookies after closing this webpage.

Read Cookie Policy.

PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

Copyright © 2021 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy