• 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 900 Times!

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, 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

Get new posts by email:

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 (24.3K Followers)
  • Twitter (5.8k 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

  • What is an Automatic Ethanol Fireplace February 8, 2023
  • Disadvantages of Cloud-Native Computing February 7, 2023
  • Projector Screen Basics February 6, 2023
  • What is Configuration Management February 5, 2023
  • What is ChatGPT? February 3, 2023

About This Article

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

Source:The Customize Windows, JiMA.in

PC users can consult Corrine Chorney for Security.

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

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

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT