{"id":13708,"date":"2024-12-11T11:18:29","date_gmt":"2024-12-11T11:18:29","guid":{"rendered":"https:\/\/www.bodhost.com\/kb\/?p=13708"},"modified":"2026-02-26T14:02:09","modified_gmt":"2026-02-26T14:02:09","slug":"how-to-install-an-ssl-certificate-on-nginx","status":"publish","type":"post","link":"https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/","title":{"rendered":"How to Install an SSL Certificate on NGINX"},"content":{"rendered":"<p>Securing your website with SSL protects data and builds user trust. In this guide, we\u2019ll walk you through the steps to efficiently install an SSL certificate on NGINX.<\/p>\n<p>To successfully install an <a href=\"https:\/\/www.bodhost.com\/security\/ssl-certificate\" target=\"_blank\" rel=\"noopener\">SSL certificate<\/a> on your NGINX server, you will need the following files:<\/p>\n<ul>\n<li>Primary certificate (.crt file)<\/li>\n<li>Root and intermediate certificates (.ca-bundle file)<\/li>\n<\/ul>\n<p>Once you have obtained these files from your Certificate Authority (CA), follow the steps below to complete the installation.<\/p>\n<ol>\n<li><strong>Combine the Certificates: <\/strong>The first step is to combine all the certificates issued for your domain into a single file. You can do this either manually or using commands.\n<p><strong>Manual Combination: <\/strong>Ensure you follow this sequence when combining the certificates:<br \/>\n1. Primary certificate for your domain.<br \/>\n2. Intermediate certificates.<br \/>\n3. Root certificate.<strong>Automatic Combination: <\/strong>Use the following commands to combine the certificates:<\/p>\n<p>1. If you have separate intermediate and root files:<\/p>\n<p><em><strong>cat your_domain.crt intermediate.crt root.crt &gt;&gt; ssl-bundle.crt<\/strong><\/em><\/p>\n<p>2. If your intermediate and root certificates are in a single .ca-bundle file:<\/p>\n<p><em><strong>cat your_domain.crt bundle.crt &gt;&gt; ssl-bundle.crt<\/strong><\/em><\/p>\n<p>Note: Replace your_domain.crt and bundle.crt with the actual file names.<br \/>\nSave the combined file (ssl-bundle.crt) in your NGINX server\u2019s SSL directory.<\/li>\n<li>Edit the NGINX Configuration File:<br \/>\nNext, modify the NGINX configuration file (nginx.conf) to include the SSL settings.<\/p>\n<ol>\n<li>Locate the virtual host for port 443. If one doesn\u2019t exist, duplicate the virtual host for port 80 and update it to listen on port 443.<\/li>\n<li>Add or update the following properties in the virtual host record:\n<ol>\n<li>SSL on;<\/li>\n<li>ssl_certificate \u2013 Path to the combined SSL file (ssl-bundle.crt).<\/li>\n<li>ssl_certificate_key \u2013 Path to your private key file (generated during the CSR creation).<\/li>\n<\/ol>\n<\/li>\n<li>Your updated configuration should look like this:\n<pre>server { \r\n\r\n\u00a0\u00a0\u00a0 listen 443;\u00a0 \r\n\r\n\u00a0\u00a0\u00a0 ssl on;\u00a0 \r\n\r\n\u00a0\u00a0\u00a0 ssl_certificate \/etc\/ssl\/ssl-bundle.crt;\u00a0 \r\n\r\n\u00a0\u00a0\u00a0 ssl_certificate_key \/etc\/ssl\/private.key;\u00a0 \r\n\r\n\u00a0\u00a0\u00a0 server_name yourdomain.com;\u00a0 \r\n\r\n\u00a0\u00a0\u00a0 access_log \/var\/log\/nginx\/nginx.vhost.access.log;\u00a0 \r\n\r\n\u00a0\u00a0\u00a0 error_log \/var\/log\/nginx\/nginx.vhost.error.log;\u00a0 \r\n\r\n\u00a0\u00a0\u00a0 location \/ {\u00a0 \r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 root \/var\/www\/;\u00a0 \r\n\r\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 index index.html;\u00a0 \r\n\r\n\u00a0\u00a0\u00a0 }\u00a0 \r\n\r\n}<\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<li>Restart NGINX<br \/>\nAfter saving the configuration file, restart the NGINX server to apply the changes:<strong><em>sudo \/etc\/init.d\/nginx restart<\/em><\/strong><\/li>\n<li>Your SSL certificate will be installed successfully on your NGINX server.<\/li>\n<li>Verify<br \/>\nTo verify the installation, use an online SSL checker tool to confirm your site is secured.<\/li>\n<\/ol>\n<p>You can now install an SSL Certificate on NGINX. If you need further assistance, please don\u2019t hesitate to contact our support team.<\/p>\n<p>Read Also: <a href=\"https:\/\/www.bodhost.com\/kb\/how-to-install-nginx-in-whm\/\" target=\"_blank\" rel=\"noopener\">How to Install NGINX in WHM<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Securing your website with SSL protects data and builds user trust. In this guide, we\u2019ll walk you through the steps to efficiently install an SSL certificate on NGINX. To successfully&hellip;<\/p>\n<p><a href=\"https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/\" class=\"more-link\">Read More<\/a><\/p>\n","protected":false},"author":21,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[864],"tags":[1585],"class_list":["post-13708","post","type-post","status-publish","format-standard","hentry","category-ssl","tag-install-an-ssl-certificate-on-nginx"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install an SSL Certificate on NGINX<\/title>\n<meta name=\"description\" content=\"Installing an SSL certificate on NGINX ensures secure data transmission by encrypting the connection between the server and clients.\" \/>\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.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/\" \/>\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 NGINX\" \/>\n<meta property=\"og:description\" content=\"Installing an SSL certificate on NGINX ensures secure data transmission by encrypting the connection between the server and clients.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/\" \/>\n<meta property=\"og:site_name\" content=\"Knowledge Base - bodHOST\" \/>\n<meta property=\"article:published_time\" content=\"2024-12-11T11:18:29+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-02-26T14:02:09+00:00\" \/>\n<meta name=\"author\" content=\"Serena\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Serena\" \/>\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.bodhost.com\\\/kb\\\/how-to-install-an-ssl-certificate-on-nginx\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-install-an-ssl-certificate-on-nginx\\\/\"},\"author\":{\"name\":\"Serena\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\"},\"headline\":\"How to Install an SSL Certificate on NGINX\",\"datePublished\":\"2024-12-11T11:18:29+00:00\",\"dateModified\":\"2026-02-26T14:02:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-install-an-ssl-certificate-on-nginx\\\/\"},\"wordCount\":375,\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"keywords\":[\"Install an SSL Certificate on NGINX\"],\"articleSection\":[\"SSL\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-install-an-ssl-certificate-on-nginx\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-install-an-ssl-certificate-on-nginx\\\/\",\"name\":\"How to Install an SSL Certificate on NGINX\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2024-12-11T11:18:29+00:00\",\"dateModified\":\"2026-02-26T14:02:09+00:00\",\"description\":\"Installing an SSL certificate on NGINX ensures secure data transmission by encrypting the connection between the server and clients.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-install-an-ssl-certificate-on-nginx\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-install-an-ssl-certificate-on-nginx\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/how-to-install-an-ssl-certificate-on-nginx\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SSL\",\"item\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/category\\\/ssl\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install an SSL Certificate on NGINX\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\"},\"alternateName\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#organization\",\"name\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"contentUrl\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2025\\\/10\\\/Profile-Pic.png\",\"width\":240,\"height\":240,\"caption\":\"Web Hosting Knowledge Base | bodHOST Hosting FAQ\"},\"image\":{\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/ffd3f118493c99471ae5bd4790a55830\",\"name\":\"Serena\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g\",\"caption\":\"Serena\"},\"url\":\"https:\\\/\\\/www.bodhost.com\\\/kb\\\/author\\\/seema\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install an SSL Certificate on NGINX","description":"Installing an SSL certificate on NGINX ensures secure data transmission by encrypting the connection between the server and clients.","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.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/","og_locale":"en_US","og_type":"article","og_title":"How to Install an SSL Certificate on NGINX","og_description":"Installing an SSL certificate on NGINX ensures secure data transmission by encrypting the connection between the server and clients.","og_url":"https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/","og_site_name":"Knowledge Base - bodHOST","article_published_time":"2024-12-11T11:18:29+00:00","article_modified_time":"2026-02-26T14:02:09+00:00","author":"Serena","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Serena","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/#article","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/"},"author":{"name":"Serena","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830"},"headline":"How to Install an SSL Certificate on NGINX","datePublished":"2024-12-11T11:18:29+00:00","dateModified":"2026-02-26T14:02:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/"},"wordCount":375,"publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"keywords":["Install an SSL Certificate on NGINX"],"articleSection":["SSL"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/","url":"https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/","name":"How to Install an SSL Certificate on NGINX","isPartOf":{"@id":"https:\/\/www.bodhost.com\/kb\/#website"},"datePublished":"2024-12-11T11:18:29+00:00","dateModified":"2026-02-26T14:02:09+00:00","description":"Installing an SSL certificate on NGINX ensures secure data transmission by encrypting the connection between the server and clients.","breadcrumb":{"@id":"https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bodhost.com\/kb\/how-to-install-an-ssl-certificate-on-nginx\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"SSL","item":"https:\/\/www.bodhost.com\/kb\/category\/ssl\/"},{"@type":"ListItem","position":2,"name":"How to Install an SSL Certificate on NGINX"}]},{"@type":"WebSite","@id":"https:\/\/www.bodhost.com\/kb\/#website","url":"https:\/\/www.bodhost.com\/kb\/","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","description":"","publisher":{"@id":"https:\/\/www.bodhost.com\/kb\/#organization"},"alternateName":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bodhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bodhost.com\/kb\/#organization","name":"Web Hosting Knowledge Base | bodHOST Hosting FAQ","url":"https:\/\/www.bodhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","contentUrl":"https:\/\/www.bodhost.com\/kb\/wp-content\/uploads\/2025\/10\/Profile-Pic.png","width":240,"height":240,"caption":"Web Hosting Knowledge Base | bodHOST Hosting FAQ"},"image":{"@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.bodhost.com\/kb\/#\/schema\/person\/ffd3f118493c99471ae5bd4790a55830","name":"Serena","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8bf3c9f6220a13a4d46295ad7c38a0c9e351ca3a57d0e417580c8e8b83a12a50?s=96&d=mm&r=g","caption":"Serena"},"url":"https:\/\/www.bodhost.com\/kb\/author\/seema\/"}]}},"_links":{"self":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13708","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/comments?post=13708"}],"version-history":[{"count":4,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13708\/revisions"}],"predecessor-version":[{"id":13712,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/posts\/13708\/revisions\/13712"}],"wp:attachment":[{"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/media?parent=13708"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/categories?post=13708"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bodhost.com\/kb\/wp-json\/wp\/v2\/tags?post=13708"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}