SlideShare une entreprise Scribd logo
1  sur  2
SSL Installation Guide on Nginx Web Server
Firstof all,create a ‘Certificate Bundle’togetstartedwiththe procedure of SSLinstallationinNginx.For
creatingthe bundle,eachcertificate (SSLcertificate,Intermediate certificate andRoot certificate) needs
to be in the PEM format.
 In a plain text editor, open each certificates.
 Now proceed by creating a new document in a plain text editor.
 Your SSL Certificate
 Intermediate SSL certificate
 Root SSL Certificate
 This completes your file and its format should be as follows:
-----BEGIN CERTIFICATE-----
#Your SSL Certificate#
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
#Intermediate Certificate#
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
#Root Certificate#
-----END CERTIFICATE-----
 This newly-created certificate bundle should be saved in a ‘.crt’ format.
 After saving it properly, upload the certificate bundle along with the private key to a directory
on the Nginx server.
 After that, edit the Nginx virtual hosts file.
For that, open the Nginx virtual host file for the website you intend to secure. In case you want
your site to be accessible through both, secure (https) and non-secure (http) connections, you
need to have a server module for each connection type.
Now proceed by making a copy of the existing non-secure module and pasting it below the
original. Add the lines in the format given below:
server{
listen 443;
ssl on;
ssl_certificate /etc/ssl/your_domain.crt;
ssl_certificate_key /etc/ssl/your_domain.key;
server_name your.domain.com;
access_log /var/log/nginx/nginx.vhost.access.log;
error_log /var/log/nginx/nginx.vhost.error.log;
location / {
root /home/www/public_html/your.domain.com/public/;
index index.html;
}
}
 Please note it is very important to make sure you adjust the file names so as to match your
certificate files.
 Ssl_certificate should be your primary certificate which is combined with the root and
intermediate certificate bundle created in previous steps. For example, your_domain.crt.
 When you generate the CSR, ssl_certificate_key should be the key file that is created.
 Now restart Nginx.

Contenu connexe

Similaire à How to Install SSL Certificate in Nginx - Guide

NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)Marcel Cattaneo
 
How To Create a SSL Certificate on Nginx for Ubuntu.pptx
How To Create a SSL Certificate on Nginx for Ubuntu.pptxHow To Create a SSL Certificate on Nginx for Ubuntu.pptx
How To Create a SSL Certificate on Nginx for Ubuntu.pptxVEXXHOST Private Cloud
 
Various Types of OpenSSL Commands and Keytool
Various Types of OpenSSL Commands and KeytoolVarious Types of OpenSSL Commands and Keytool
Various Types of OpenSSL Commands and KeytoolCheapSSLsecurity
 
Adobe Connect on-premise SSL Guide
Adobe Connect on-premise SSL GuideAdobe Connect on-premise SSL Guide
Adobe Connect on-premise SSL GuideRapidSSLOnline.com
 
How to Install SSL Certificate in Red Hat Linux Apache Web Server
How to Install SSL Certificate in Red Hat Linux Apache Web ServerHow to Install SSL Certificate in Red Hat Linux Apache Web Server
How to Install SSL Certificate in Red Hat Linux Apache Web ServerAboutSSL
 
Deploying The NSX Manager Virtual Appliance
Deploying The NSX Manager Virtual ApplianceDeploying The NSX Manager Virtual Appliance
Deploying The NSX Manager Virtual ApplianceDavid kankam
 
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiaSeattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiazznate
 
Open-VPN Server
Open-VPN ServerOpen-VPN Server
Open-VPN ServerManish Kc
 
Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21Max Kleiner
 
Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Netwax Lab
 
vpn router Mikrotik
vpn router Mikrotikvpn router Mikrotik
vpn router Mikrotiktodangkhoa
 
Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiazznate
 
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).DataStax Academy
 
Apache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validationApache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validationJean-Frederic Clere
 
HashiTalks France 2023 - Sécurisez la distribution automatique de vos certif...
HashiTalks France 2023 - Sécurisez la distribution automatique de vos certif...HashiTalks France 2023 - Sécurisez la distribution automatique de vos certif...
HashiTalks France 2023 - Sécurisez la distribution automatique de vos certif...Stéphane Este-Gracias
 

Similaire à How to Install SSL Certificate in Nginx - Guide (20)

NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)
 
How To Create a SSL Certificate on Nginx for Ubuntu.pptx
How To Create a SSL Certificate on Nginx for Ubuntu.pptxHow To Create a SSL Certificate on Nginx for Ubuntu.pptx
How To Create a SSL Certificate on Nginx for Ubuntu.pptx
 
Various Types of OpenSSL Commands and Keytool
Various Types of OpenSSL Commands and KeytoolVarious Types of OpenSSL Commands and Keytool
Various Types of OpenSSL Commands and Keytool
 
Adobe Connect on-premise SSL Guide
Adobe Connect on-premise SSL GuideAdobe Connect on-premise SSL Guide
Adobe Connect on-premise SSL Guide
 
How to Install SSL Certificate in Red Hat Linux Apache Web Server
How to Install SSL Certificate in Red Hat Linux Apache Web ServerHow to Install SSL Certificate in Red Hat Linux Apache Web Server
How to Install SSL Certificate in Red Hat Linux Apache Web Server
 
Let's Encrypt!
Let's Encrypt!Let's Encrypt!
Let's Encrypt!
 
Deploying The NSX Manager Virtual Appliance
Deploying The NSX Manager Virtual ApplianceDeploying The NSX Manager Virtual Appliance
Deploying The NSX Manager Virtual Appliance
 
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiaSeattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
 
Rhel5
Rhel5Rhel5
Rhel5
 
Open-VPN Server
Open-VPN ServerOpen-VPN Server
Open-VPN Server
 
Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21
 
Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)Cisco iso based CA (certificate authority)
Cisco iso based CA (certificate authority)
 
vpn router Mikrotik
vpn router Mikrotikvpn router Mikrotik
vpn router Mikrotik
 
Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoia
 
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
 
Identity service keystone ppt
Identity service keystone pptIdentity service keystone ppt
Identity service keystone ppt
 
Apache Web Server
Apache Web ServerApache Web Server
Apache Web Server
 
Implementing cert-manager in K8s
Implementing cert-manager in K8sImplementing cert-manager in K8s
Implementing cert-manager in K8s
 
Apache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validationApache httpd and TLS/SSL certificates validation
Apache httpd and TLS/SSL certificates validation
 
HashiTalks France 2023 - Sécurisez la distribution automatique de vos certif...
HashiTalks France 2023 - Sécurisez la distribution automatique de vos certif...HashiTalks France 2023 - Sécurisez la distribution automatique de vos certif...
HashiTalks France 2023 - Sécurisez la distribution automatique de vos certif...
 

Plus de RapidSSLOnline.com

Tackle ERR_SSL_PROTOCOL_ERROR in Google Chrome
Tackle ERR_SSL_PROTOCOL_ERROR in Google ChromeTackle ERR_SSL_PROTOCOL_ERROR in Google Chrome
Tackle ERR_SSL_PROTOCOL_ERROR in Google ChromeRapidSSLOnline.com
 
Viewing SSL Certificate in Chrome | RapidSSLonline
Viewing SSL Certificate in Chrome | RapidSSLonlineViewing SSL Certificate in Chrome | RapidSSLonline
Viewing SSL Certificate in Chrome | RapidSSLonlineRapidSSLOnline.com
 
Compare GeoTrust True BusinessID SSL Data Sheet
Compare GeoTrust True BusinessID SSL Data SheetCompare GeoTrust True BusinessID SSL Data Sheet
Compare GeoTrust True BusinessID SSL Data SheetRapidSSLOnline.com
 
Introducing TLS 1.3 – The future of Encryption
Introducing TLS 1.3 – The future of EncryptionIntroducing TLS 1.3 – The future of Encryption
Introducing TLS 1.3 – The future of EncryptionRapidSSLOnline.com
 
GUIDE ON INSTALLING SSL CERTIFICATE ON IBM HTTP SERVER
GUIDE ON INSTALLING SSL CERTIFICATE ON IBM HTTP SERVERGUIDE ON INSTALLING SSL CERTIFICATE ON IBM HTTP SERVER
GUIDE ON INSTALLING SSL CERTIFICATE ON IBM HTTP SERVERRapidSSLOnline.com
 
Cybersecurity Compliance can Make or Break Your Business - DigiCert - Symantec
Cybersecurity Compliance can Make or Break Your Business - DigiCert - SymantecCybersecurity Compliance can Make or Break Your Business - DigiCert - Symantec
Cybersecurity Compliance can Make or Break Your Business - DigiCert - SymantecRapidSSLOnline.com
 
How to Move SSL Certificate from Windows Server to Another Windows Server
How to Move SSL Certificate from Windows Server to Another Windows ServerHow to Move SSL Certificate from Windows Server to Another Windows Server
How to Move SSL Certificate from Windows Server to Another Windows ServerRapidSSLOnline.com
 
Symmetric and Asymmetric Encryption
Symmetric and Asymmetric EncryptionSymmetric and Asymmetric Encryption
Symmetric and Asymmetric EncryptionRapidSSLOnline.com
 
SSL / TLS Validation | CASecurity.org | RapidSSLonline
SSL / TLS Validation | CASecurity.org | RapidSSLonlineSSL / TLS Validation | CASecurity.org | RapidSSLonline
SSL / TLS Validation | CASecurity.org | RapidSSLonlineRapidSSLOnline.com
 
Geek Guide: Apache Web Servers and SSL Authentication
Geek Guide: Apache Web Servers and SSL AuthenticationGeek Guide: Apache Web Servers and SSL Authentication
Geek Guide: Apache Web Servers and SSL AuthenticationRapidSSLOnline.com
 
A Complete RapidSSL Guide on Securing Online Business with SSL Certificate
A Complete RapidSSL Guide on Securing Online Business with SSL CertificateA Complete RapidSSL Guide on Securing Online Business with SSL Certificate
A Complete RapidSSL Guide on Securing Online Business with SSL CertificateRapidSSLOnline.com
 
Google Chrome 56 What You Need to Know?
Google Chrome 56   What You Need to Know?Google Chrome 56   What You Need to Know?
Google Chrome 56 What You Need to Know?RapidSSLOnline.com
 
The Hidden Costs of SelfSigned SSL Certificates
The Hidden Costs of SelfSigned SSL Certificates The Hidden Costs of SelfSigned SSL Certificates
The Hidden Costs of SelfSigned SSL Certificates RapidSSLOnline.com
 
5 Steps for Preventing Ransomware
5 Steps for Preventing Ransomware5 Steps for Preventing Ransomware
5 Steps for Preventing RansomwareRapidSSLOnline.com
 
2016 Symantec Internet Security Threat Report
2016 Symantec Internet Security Threat Report2016 Symantec Internet Security Threat Report
2016 Symantec Internet Security Threat ReportRapidSSLOnline.com
 
How Does The Wildcard SSL Work?
How Does The Wildcard SSL Work?How Does The Wildcard SSL Work?
How Does The Wildcard SSL Work?RapidSSLOnline.com
 
Uncover threats and protect your organization
Uncover threats and protect your organizationUncover threats and protect your organization
Uncover threats and protect your organizationRapidSSLOnline.com
 
A New Zero-Day Vulnerability Discovered Every Week in 2015
A New Zero-Day Vulnerability Discovered Every Week in 2015A New Zero-Day Vulnerability Discovered Every Week in 2015
A New Zero-Day Vulnerability Discovered Every Week in 2015RapidSSLOnline.com
 
Symantec 2016 Security Predictions - Looking ahead
Symantec 2016 Security Predictions - Looking aheadSymantec 2016 Security Predictions - Looking ahead
Symantec 2016 Security Predictions - Looking aheadRapidSSLOnline.com
 

Plus de RapidSSLOnline.com (20)

Tackle ERR_SSL_PROTOCOL_ERROR in Google Chrome
Tackle ERR_SSL_PROTOCOL_ERROR in Google ChromeTackle ERR_SSL_PROTOCOL_ERROR in Google Chrome
Tackle ERR_SSL_PROTOCOL_ERROR in Google Chrome
 
Viewing SSL Certificate in Chrome | RapidSSLonline
Viewing SSL Certificate in Chrome | RapidSSLonlineViewing SSL Certificate in Chrome | RapidSSLonline
Viewing SSL Certificate in Chrome | RapidSSLonline
 
Compare GeoTrust True BusinessID SSL Data Sheet
Compare GeoTrust True BusinessID SSL Data SheetCompare GeoTrust True BusinessID SSL Data Sheet
Compare GeoTrust True BusinessID SSL Data Sheet
 
Introducing TLS 1.3 – The future of Encryption
Introducing TLS 1.3 – The future of EncryptionIntroducing TLS 1.3 – The future of Encryption
Introducing TLS 1.3 – The future of Encryption
 
GUIDE ON INSTALLING SSL CERTIFICATE ON IBM HTTP SERVER
GUIDE ON INSTALLING SSL CERTIFICATE ON IBM HTTP SERVERGUIDE ON INSTALLING SSL CERTIFICATE ON IBM HTTP SERVER
GUIDE ON INSTALLING SSL CERTIFICATE ON IBM HTTP SERVER
 
Cybersecurity Compliance can Make or Break Your Business - DigiCert - Symantec
Cybersecurity Compliance can Make or Break Your Business - DigiCert - SymantecCybersecurity Compliance can Make or Break Your Business - DigiCert - Symantec
Cybersecurity Compliance can Make or Break Your Business - DigiCert - Symantec
 
How to Move SSL Certificate from Windows Server to Another Windows Server
How to Move SSL Certificate from Windows Server to Another Windows ServerHow to Move SSL Certificate from Windows Server to Another Windows Server
How to Move SSL Certificate from Windows Server to Another Windows Server
 
Symmetric and Asymmetric Encryption
Symmetric and Asymmetric EncryptionSymmetric and Asymmetric Encryption
Symmetric and Asymmetric Encryption
 
SSL / TLS Validation | CASecurity.org | RapidSSLonline
SSL / TLS Validation | CASecurity.org | RapidSSLonlineSSL / TLS Validation | CASecurity.org | RapidSSLonline
SSL / TLS Validation | CASecurity.org | RapidSSLonline
 
Geek Guide: Apache Web Servers and SSL Authentication
Geek Guide: Apache Web Servers and SSL AuthenticationGeek Guide: Apache Web Servers and SSL Authentication
Geek Guide: Apache Web Servers and SSL Authentication
 
All About SSL/TLS
All About SSL/TLSAll About SSL/TLS
All About SSL/TLS
 
A Complete RapidSSL Guide on Securing Online Business with SSL Certificate
A Complete RapidSSL Guide on Securing Online Business with SSL CertificateA Complete RapidSSL Guide on Securing Online Business with SSL Certificate
A Complete RapidSSL Guide on Securing Online Business with SSL Certificate
 
Google Chrome 56 What You Need to Know?
Google Chrome 56   What You Need to Know?Google Chrome 56   What You Need to Know?
Google Chrome 56 What You Need to Know?
 
The Hidden Costs of SelfSigned SSL Certificates
The Hidden Costs of SelfSigned SSL Certificates The Hidden Costs of SelfSigned SSL Certificates
The Hidden Costs of SelfSigned SSL Certificates
 
5 Steps for Preventing Ransomware
5 Steps for Preventing Ransomware5 Steps for Preventing Ransomware
5 Steps for Preventing Ransomware
 
2016 Symantec Internet Security Threat Report
2016 Symantec Internet Security Threat Report2016 Symantec Internet Security Threat Report
2016 Symantec Internet Security Threat Report
 
How Does The Wildcard SSL Work?
How Does The Wildcard SSL Work?How Does The Wildcard SSL Work?
How Does The Wildcard SSL Work?
 
Uncover threats and protect your organization
Uncover threats and protect your organizationUncover threats and protect your organization
Uncover threats and protect your organization
 
A New Zero-Day Vulnerability Discovered Every Week in 2015
A New Zero-Day Vulnerability Discovered Every Week in 2015A New Zero-Day Vulnerability Discovered Every Week in 2015
A New Zero-Day Vulnerability Discovered Every Week in 2015
 
Symantec 2016 Security Predictions - Looking ahead
Symantec 2016 Security Predictions - Looking aheadSymantec 2016 Security Predictions - Looking ahead
Symantec 2016 Security Predictions - Looking ahead
 

How to Install SSL Certificate in Nginx - Guide

  • 1. SSL Installation Guide on Nginx Web Server Firstof all,create a ‘Certificate Bundle’togetstartedwiththe procedure of SSLinstallationinNginx.For creatingthe bundle,eachcertificate (SSLcertificate,Intermediate certificate andRoot certificate) needs to be in the PEM format.  In a plain text editor, open each certificates.  Now proceed by creating a new document in a plain text editor.  Your SSL Certificate  Intermediate SSL certificate  Root SSL Certificate  This completes your file and its format should be as follows: -----BEGIN CERTIFICATE----- #Your SSL Certificate# -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- #Intermediate Certificate# -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- #Root Certificate# -----END CERTIFICATE-----  This newly-created certificate bundle should be saved in a ‘.crt’ format.  After saving it properly, upload the certificate bundle along with the private key to a directory on the Nginx server.  After that, edit the Nginx virtual hosts file. For that, open the Nginx virtual host file for the website you intend to secure. In case you want your site to be accessible through both, secure (https) and non-secure (http) connections, you need to have a server module for each connection type.
  • 2. Now proceed by making a copy of the existing non-secure module and pasting it below the original. Add the lines in the format given below: server{ listen 443; ssl on; ssl_certificate /etc/ssl/your_domain.crt; ssl_certificate_key /etc/ssl/your_domain.key; server_name your.domain.com; access_log /var/log/nginx/nginx.vhost.access.log; error_log /var/log/nginx/nginx.vhost.error.log; location / { root /home/www/public_html/your.domain.com/public/; index index.html; } }  Please note it is very important to make sure you adjust the file names so as to match your certificate files.  Ssl_certificate should be your primary certificate which is combined with the root and intermediate certificate bundle created in previous steps. For example, your_domain.crt.  When you generate the CSR, ssl_certificate_key should be the key file that is created.  Now restart Nginx.