{"id":68,"date":"2019-07-09T07:09:39","date_gmt":"2019-07-09T07:09:39","guid":{"rendered":"https:\/\/www.ssls.com\/knowledgebase\/?p=68"},"modified":"2025-09-08T12:55:04","modified_gmt":"2025-09-08T12:55:04","slug":"how-to-install-an-ssl-certificate-on-a-nginx-server","status":"publish","type":"post","link":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/","title":{"rendered":"How to install an SSL certificate on a NGINX server"},"content":{"rendered":"<blockquote><p><span style=\"font-weight: 400;\">Secure your site the easy way with our <\/span><a href=\"https:\/\/www.ssls.com\/knowledgebase\/ssl-installation-service\/\"><span style=\"font-weight: 400;\">SSL installation service<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p><\/blockquote>\n<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube-nocookie.com\/embed\/sB9JuqRkEco\" width=\"640\" height=\"420\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>After your Certificate is issued by the Certificate Authority, you\u2019re ready to begin installation on your NGINX server. Follow these steps:<\/p>\n<p><strong>Step 1: Combine Certificates Into One File<\/strong><\/p>\n<p>The Certificate Authority will email you a zip-archive with several .crt files. You need to link the Certificate issued for your domain with intermediate and root certificates into one file.<\/p>\n<p>The order of Certificates in the file is important. First needs to be the Certificate for your domain name, second the intermediate Certificates, and last in the chain must be the root Certificate.<br \/>\nYou can combine the files either manually, by copying and pasting the correspondent Certificates into one single file. Or you can use the following commands if the Certificate files were uploaded to the server:<\/p>\n<p><strong>1) Method if you received and uploaded the intermediate and root Certificates separately<\/strong><\/p>\n<p>Add this command:<\/p>\n<pre><em><strong>cat your_domain.crt intermediate.crt root.crt &gt;&gt; ssl-bundle.crt<\/strong><\/em><\/pre>\n<p>For example, this would be the command for a PositiveSSL Certificate:<\/p>\n<pre><em><strong>cat example_com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt &gt;&gt; ssl-bundle.crt<\/strong><\/em><\/pre>\n<p><strong>2) Method if you received the intermediate Certificates in one bundle file, or downloaded the Certificate files from your SSLs.com Account<\/strong><\/p>\n<p>Run this command:<\/p>\n<pre><em><strong>cat your_domain.crt your_domain.ca-bundle &gt;&gt; ssl-bundle.crt<\/strong><\/em><\/pre>\n<p>Place the created file into the directory with the SSL certificates on your NGINX server.<\/p>\n<p><strong><b>Step 2: Edit NGINX Configuration File<\/b><\/strong><\/p>\n<p>After the Certificate is uploaded, you need to modify your NGINX configuration file (by default it is called nginx.conf).<\/p>\n<p>Then you\u2019ll edit or add Virtual Host for 443 port for your website. If there\u2019s no Virtual Host for 443 port, you can duplicate the record for port 80 (it should be in the configuration file by default) and change port 80 to port 443. Simply add it below the non-secure module.<\/p>\n<p>You will then need to add these specific lines into the record:<\/p>\n<p style=\"padding-left: 40px;\"><b>ssl on;<\/b><\/p>\n<p style=\"padding-left: 40px;\"><b>ssl_certificate <\/b>(should be pointed to the location of the created Certificate file)<\/p>\n<p style=\"padding-left: 40px;\"><b>ssl_certificate_key<\/b> (should be pointed to the location of the Private Key generated along with the CSR that was used during Certificate activation)<\/p>\n<p>The completed Virtual Host should look like this:<\/p>\n<pre><em><strong>server {<\/strong><\/em>\n\n<em><strong>listen 443 ssl;<\/strong><\/em>\n\n<em><strong>ssl_certificate \/etc\/ssl\/ssl-bundle.crt;<\/strong><\/em>\n\n<em><strong>ssl_certificate_key \/etc\/ssl\/ssl-tutorials.key;<\/strong><\/em>\n\n<em><strong>server_name ssl-tutorials.com;<\/strong><\/em>\n\n<em><strong>access_log \/var\/log\/nginx\/nginx.vhost.access.log;<\/strong><\/em>\n\n<em><strong>error_log \/var\/log\/nginx\/nginx.vhost.error.log;<\/strong><\/em>\n\n<em><strong>location \/ {<\/strong><\/em>\n\n<em><strong>root \/var\/www\/;<\/strong><\/em>\n\n<em><strong>index index.html;<\/strong><\/em>\n\n<em><strong>}<\/strong><\/em>\n\n<em><strong>}<\/strong><\/em><\/pre>\n<p><strong>Note<\/strong>: For Nginx version 1.14 and below, use <em><strong>listen 443; ssl on;<\/strong><\/em> instead of <strong><em>listen 443 ssl<\/em><\/strong>.<\/p>\n<p><b>Note: <\/b>OCSP Stapling can be configured on NGINX server starting from 1.3.7+<\/p>\n<p>If you want to configure <a href=\"https:\/\/www.ssls.com\/knowledgebase\/what-is-ocsp-stapling\/\">OCSP Stapling<\/a> on your server, add the following lines to the Virtual Host section for the website:<\/p>\n<pre><strong><i>ssl_stapling on;<\/i><\/strong>\n\n<strong><i>ssl_stapling_verify on;<\/i><\/strong><\/pre>\n<p>After the modifications are saved, restart the NGINX server with one of the following commands to apply your changes:<\/p>\n<pre><strong><i>service nginx restart<\/i><\/strong><\/pre>\n<p>OR<\/p>\n<pre><em><strong>sudo systemctl restart nginx<\/strong><\/em><\/pre>\n<p>OR<\/p>\n<pre><strong><i>\/etc\/init.d\/nginx restart<\/i><\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Secure your site the easy way with our SSL installation service. After your Certificate is issued by the Certificate Authority, you\u2019re ready to begin installation on your NGINX server. Follow these steps: Step 1: Combine Certificates Into One File The Certificate Authority will email you a zip-archive with several .crt files. You need to link ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-ssl-installation-instructions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to install an SSL certificate on a NGINX server \u2013 HelpDesk | SSLs.com<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install an SSL certificate on a NGINX server \u2013 HelpDesk | SSLs.com\" \/>\n<meta property=\"og:description\" content=\"Secure your site the easy way with our SSL installation service. After your Certificate is issued by the Certificate Authority, you\u2019re ready to begin installation on your NGINX server. Follow these steps: Step 1: Combine Certificates Into One File The Certificate Authority will email you a zip-archive with several .crt files. You need to link ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/\" \/>\n<meta property=\"og:site_name\" content=\"SSL Certificate Knowledgebase | SSLs.com\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/SSLsCom\" \/>\n<meta property=\"article:published_time\" content=\"2019-07-09T07:09:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-08T12:55:04+00:00\" \/>\n<meta name=\"author\" content=\"sslbizdev\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SSLscom\" \/>\n<meta name=\"twitter:site\" content=\"@SSLscom\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"sslbizdev\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/\"},\"author\":{\"name\":\"sslbizdev\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/person\/7e29a188929740c7a59d9a1c15c18806\"},\"headline\":\"How to install an SSL certificate on a NGINX server\",\"datePublished\":\"2019-07-09T07:09:39+00:00\",\"dateModified\":\"2025-09-08T12:55:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/\"},\"wordCount\":412,\"publisher\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#organization\"},\"articleSection\":[\"SSL Installation instructions\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/\",\"url\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/\",\"name\":\"How to install an SSL certificate on a NGINX server \u2013 HelpDesk | SSLs.com\",\"isPartOf\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#website\"},\"datePublished\":\"2019-07-09T07:09:39+00:00\",\"dateModified\":\"2025-09-08T12:55:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.ssls.com\/knowledgebase\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install an SSL certificate on a NGINX server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#website\",\"url\":\"https:\/\/www.ssls.com\/knowledgebase\/\",\"name\":\"SSL Certificate Knowledgebase | SSLs.com\",\"description\":\"SSL Knowledgebase | SSLs.com\",\"publisher\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.ssls.com\/knowledgebase\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#organization\",\"name\":\"SSLs.com\",\"url\":\"https:\/\/www.ssls.com\/knowledgebase\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/8WCg7Uph_400x400-1.png\",\"contentUrl\":\"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/8WCg7Uph_400x400-1.png\",\"width\":400,\"height\":400,\"caption\":\"SSLs.com\"},\"image\":{\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/SSLsCom\",\"https:\/\/x.com\/SSLscom\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/person\/7e29a188929740c7a59d9a1c15c18806\",\"name\":\"sslbizdev\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g\",\"caption\":\"sslbizdev\"},\"url\":\"https:\/\/www.ssls.com\/knowledgebase\/author\/sslbizdev\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to install an SSL certificate on a NGINX server \u2013 HelpDesk | SSLs.com","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/","og_locale":"en_US","og_type":"article","og_title":"How to install an SSL certificate on a NGINX server \u2013 HelpDesk | SSLs.com","og_description":"Secure your site the easy way with our SSL installation service. After your Certificate is issued by the Certificate Authority, you\u2019re ready to begin installation on your NGINX server. Follow these steps: Step 1: Combine Certificates Into One File The Certificate Authority will email you a zip-archive with several .crt files. You need to link ..Read more","og_url":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/","og_site_name":"SSL Certificate Knowledgebase | SSLs.com","article_publisher":"https:\/\/www.facebook.com\/SSLsCom","article_published_time":"2019-07-09T07:09:39+00:00","article_modified_time":"2025-09-08T12:55:04+00:00","author":"sslbizdev","twitter_card":"summary_large_image","twitter_creator":"@SSLscom","twitter_site":"@SSLscom","twitter_misc":{"Written by":"sslbizdev","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/#article","isPartOf":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/"},"author":{"name":"sslbizdev","@id":"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/person\/7e29a188929740c7a59d9a1c15c18806"},"headline":"How to install an SSL certificate on a NGINX server","datePublished":"2019-07-09T07:09:39+00:00","dateModified":"2025-09-08T12:55:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/"},"wordCount":412,"publisher":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/#organization"},"articleSection":["SSL Installation instructions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/","url":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/","name":"How to install an SSL certificate on a NGINX server \u2013 HelpDesk | SSLs.com","isPartOf":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/#website"},"datePublished":"2019-07-09T07:09:39+00:00","dateModified":"2025-09-08T12:55:04+00:00","breadcrumb":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.ssls.com\/knowledgebase\/how-to-install-an-ssl-certificate-on-a-nginx-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.ssls.com\/knowledgebase\/"},{"@type":"ListItem","position":2,"name":"How to install an SSL certificate on a NGINX server"}]},{"@type":"WebSite","@id":"https:\/\/www.ssls.com\/knowledgebase\/#website","url":"https:\/\/www.ssls.com\/knowledgebase\/","name":"SSL Certificate Knowledgebase | SSLs.com","description":"SSL Knowledgebase | SSLs.com","publisher":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.ssls.com\/knowledgebase\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.ssls.com\/knowledgebase\/#organization","name":"SSLs.com","url":"https:\/\/www.ssls.com\/knowledgebase\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/logo\/image\/","url":"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/8WCg7Uph_400x400-1.png","contentUrl":"https:\/\/www.ssls.com\/knowledgebase\/wp-content\/uploads\/2019\/07\/8WCg7Uph_400x400-1.png","width":400,"height":400,"caption":"SSLs.com"},"image":{"@id":"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/SSLsCom","https:\/\/x.com\/SSLscom"]},{"@type":"Person","@id":"https:\/\/www.ssls.com\/knowledgebase\/#\/schema\/person\/7e29a188929740c7a59d9a1c15c18806","name":"sslbizdev","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b43c2e48b8cf4c353e91aa8232dac0c56e490f3f1eff58a7652c7d9a866e3f66?s=96&d=mm&r=g","caption":"sslbizdev"},"url":"https:\/\/www.ssls.com\/knowledgebase\/author\/sslbizdev\/"}]}},"publishpress_future_action":{"enabled":false,"date":"2026-05-17 04:40:59","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category","extraData":[]},"publishpress_future_workflow_manual_trigger":{"enabledWorkflows":[]},"_links":{"self":[{"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":9,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":9198,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/68\/revisions\/9198"}],"wp:attachment":[{"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ssls.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}