Bobcares

How to install AlphaSSL in Nginx servers?

by | Jan 8, 2019

Installing SSL certificate on your website is a major step towards secure data transfer.

The setup of SSL slightly differs depending on the SSL provider and the web server. At times, following wrong steps for adding AlphaSSL in web servers like Nginx can cause broken website.

Here at Bobcares, we help customers to fix their SSL websites as part of our Server Support for web hosts.

Today, we’ll see how our Support Engineers install AlphaSSL in Nginx without breaking websites.

 

How to setup AlphaSSL in Nginx?

The steps for SSL install differs with the web server used on the server. For example, the setup will not be same in Apache or Nginx web server. Unfortunately, a wrong installation of SSL can easily break the website too.

Let’s now see how our Support Engineers set up AlphaSSL in Nginx server.

 

1.Getting the certificate files

As the first step, we get the necessary SSL certificate files for the website. Upon SSL purchase, AlphaSSL team will send all the certificate files to the customer’s email. This file contains the intermediate and primary certificate of the website.

We download both certificate files and copy the files to the server directory along with “.key file“. This .key file is created as part of the CSR (Certificate Signing Request) generation process.

 

2.Combining certificate files

When an intermediate certificate is not present in the certificate base of well-known trusted certificate authorities, it can create problems with website access in certain browsers.

Therefore, we need to combine the primary certificate and intermediate certificate into a single file.

By this step, we can avoid this problem and ensure proper working of the SSL website in all the browsers.

For example, to combine the domain_name.crt  and domain_name.ca-bundle to ssl-bundle.crt, our Server Engineers use the command :

cat domain_name.crt domain_name.ca-bundle > ssl-bundle.crt

 

3. Edit Nginx Virtual Host

After combining the certificate files, we need to add them into the Nginx configuration files.

For example, in Ubuntu servers, we add the file ssl-bundle.crt to the folder /etc/SSL/certs/

Additionally, our Support Engineers turn ON the SSL option, configure Listen directive to listen on port 443, etc. in Nginx. To enable the AlphaSSL on a particular website, we need to edit the per domain config file at  /etc/nginx/sites-available/ too.

Here, we add the path to the SSL certificate and key file as :

ssl_certificate /etc/ssl/certs/ssl-bundle.crt;
ssl_certificate_key /etc/ssl/private/domainname.key;

4. Nginx restart

After adding the files, we do a syntax check of the Nginx configuration. This is followed by restart and SSL will start working for the domain.

 

Common problems with AlphaSSL in Nginx and their fixes

From our experience in managing servers, we often see customers reporting problems with SSL installation in Nginx. Now, let’s see how our Support Engineers deal with it.

 

1. Problems with intermediate certificate

Out of the problems reported with Alphassl, a major share contributes to the intermediate certificate. This include:

a) Choosing the wrong intermediate certificate

For the proper working of SSL, we need to choose the intermediate certificate that matches the SSL certificate. And, if there is a mismatch, SSL will fail.  For example, in one case, customer had set up SHA256 intermediate cert while he had SHA1 certificate installed in the domain.

In another case, there was no errors in the Nginx error log. However, Alphassl was not showing as trusted in mobile Chrome browser.

To fix this, our Server Engineers had to reinstall the correct intermediate certificate for the domain in Nginx. And secure connection on the website started working again.

 

b) Error while combining certificates

Similarly, Alphassl can fail when you follow wrong order in combing the primary certificate and intermediate certificate. The order of the certificates in the file is important. The certificate for the domain name should go first, intermediate certificates should follow it.

Here, we correct this by combing the files in the correct order once again. Then we reinstall SSL to make it working again.

 

2. OCSP stapling verification failure

The Online Certificate Status Protocol (or OCSP) is a way for a web browser to determine the validity of an SSL certificate. Here, the web server downloads a copy of the SSL provider’s response which it can deliver directly to the browser. When a web browser connects to the server, it compares the SSL cert with these details. If it matches, website page will open up.

Often, we see issues with OSCP stapling with AlphaSSL in Nginx. Here, to fix our Support Engineers first add the directive in Nginx configuration to turn ON verification.

ssl_stapling_verify on;

Then, we configure the certificate of the issuer, the root certificate, and all intermediate certificates as trusted using the ssl_trusted_certificate directive. And, that normally resolves the problem with OSCP stapling.

[Finding problems with AlphaSSL setup in Nginx? We can install it for you.]

 

Conclusion

Securing Nginx websites with AlphaSSL involves a series of steps. Today, we’ve seen how our Support Engineers set up AlphaSSL in Nginx without breaking website and solve common problems with it.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF