{"id":5018,"date":"2016-10-11T00:49:12","date_gmt":"2016-10-10T21:49:12","guid":{"rendered":"https:\/\/unihost.com\/help\/?p=5018"},"modified":"2023-10-06T16:28:23","modified_gmt":"2023-10-06T13:28:23","slug":"installing-an-ssl-certificate-in-apache-mod-ssl","status":"publish","type":"post","link":"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/","title":{"rendered":"Installing an SSL certificate in Apache + Mod SSL"},"content":{"rendered":"<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">After the purchase and release of <a href=\"https:\/\/unihost.com\/en\/ssl-installation\/\">SSL-certificate<\/a>, you will receive a letter by mail with zip-archive, which will contain 2 files &#8220;namedomaine.ca-bundle&#8221; and &#8220;namedomaine.crt&#8221;. The first file contains the intermediate and root certificates, while the second is a certificate for your domain. (or codes of the certificate and CA certificate as a text file, in that case you need to create the files on your own).<\/span><!--more--><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>Step 1. Copy on the <a href=\"https:\/\/unihost.com\/en\/dedicated\/\">server<\/a>, into the directory where the Private Key is situated, files namedomaine.ca-bundle and domainname.crt.<\/strong><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">For example, using the directory <strong>&#8216;\/etc\/ssl\/youcrt\/&#8217;<\/strong>. As <strong>&#8216;private.key&#8217;<\/strong> shall mean Private key, and as <strong>&#8216;yourNAMEDOMAINE.crt&#8217;<\/strong> &#8211; public key.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>Note<\/strong>: we recommend to create a directory that will be visible only to the root directory, and transfer the private key to it.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Tip: for a given directory set the read permissions only for root user.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>Step 2. Install root and intermediate certificates on the server.<\/strong><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>2.1.<\/strong> In a text editor, open the configuration file of your server Apache 2.x httpd.conf. There you will find the VirtualHost, which refers to the SSL-certificate. It should contain the following three lines:<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">SSLCertificateChainFile \/etc\/ssl\/youcrt\/namedomaine.ca-bundle\nSSLCertificateFile \/etc\/ssl\/youcrt\/namedomaine.crt\nSSLCertificateKeyFile \/etc\/ssl\/youcrt\/private.key<\/span>\n<\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">If they are missing, add them.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">For Apache 1.x use the directive SSLCACertificateFile instead of SSLCertificateChainFile:<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">SSLCACertificateFile \/etc\/ssl\/youcrt\/namedomaine.ca-bundle<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">Note: Virtual Host section may also be in ssl.conf file.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>2.2.<\/strong> Before closing the text editor, save all changes.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>2.3.<\/strong> Restart or launch Apache web server.<\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>Additional information<\/strong><\/span><\/p>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">httpd.conf file for IP-based site should contain some or all of the following lines. Lines that are highlighted in bold are used for SSL configuring. Lines that are in italics are used for debugging.<\/span><\/p>\n<pre><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">DocumentRoot \/var\/www\/html <\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">ServerName 192.168.1.98 <\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">ServerAdmin admin@your.domain <\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">ErrorLog \/etc\/httpd\/logs\/ssl_error_log <\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">TransferLog \/etc\/httpd\/logs\/ssl_access_log <\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>SSLEngine On <\/strong><\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>SSLCertificateFile \/etc\/ssl\/youcrt\/namedomaine.crt <\/strong><\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>SSLCertificateKeyFile \/etc\/ssl\/youcrt\/namedomaine.key <\/strong><\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><strong>SSLCertificateChainFile \/etc\/ssl\/youcrt\/namedomaine.ca-bundle <\/strong><\/span>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\"><em><strong>SSLSessionCache dbm:\/var\/cache\/httpd\/ssl_cache<\/strong><\/em><\/span>\n<\/pre>\n<p><span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">More information about configuring the Apache web server is contained on the site <a href=\"http:\/\/httpd.apache.org\/docs-2.0\/mod\/mod_ssl.html\" target=\"_blank\" rel=\"nofollow noopener nofollow noopener noreferrer\">http:\/\/httpd.apache.org\/docs-2.0\/mod\/mod_ssl.html<\/a>.<\/span><br \/>\n<span style=\"font-family: Ubuntu, sans-serif; font-size: 12pt;\">To check the SSL settings and accuracy of their work, use a web browser. To do this, write in the address bar https:\/\/your server\/. If SSL certificate and the server are properly configured, you will see a CLOSED padlock icon in the address bar.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>After the purchase and release of SSL-certificate, you will receive a letter by mail with zip-archive, which will contain 2 files &#8220;namedomaine.ca-bundle&#8221; and &#8220;namedomaine.crt&#8221;. The first file contains the intermediate and root certificates, while the second is a certificate for your domain. (or codes of the certificate and CA certificate as a text file, in [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[166],"tags":[],"class_list":["post-5018","post","type-post","status-publish","format-standard","hentry","category-08-ssl"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Installing an SSL certificate in Apache + Mod SSL - Unihost.FAQ<\/title>\n<meta name=\"description\" content=\"In this guide, we want to tell you about installation an SSL certificate in Apache + Mod SSL. - Unihost.FAQ\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing an SSL certificate in Apache + Mod SSL - Unihost.FAQ\" \/>\n<meta property=\"og:description\" content=\"In this guide, we want to tell you about installation an SSL certificate in Apache + Mod SSL. - Unihost.FAQ\" \/>\n<meta property=\"og:url\" content=\"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/\" \/>\n<meta property=\"og:site_name\" content=\"Unihost.FAQ\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/unihost\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-10-10T21:49:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-06T13:28:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/unihost.com\/help\/minio.php?.\/unihost-logo-alt.png\" \/>\n\t<meta property=\"og:image:width\" content=\"250\" \/>\n\t<meta property=\"og:image:height\" content=\"141\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Unihost Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@unihost\" \/>\n<meta name=\"twitter:site\" content=\"@unihost\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Unihost Support\" \/>\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:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/\"},\"author\":{\"name\":\"Unihost Support\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\"},\"headline\":\"Installing an SSL certificate in Apache + Mod SSL\",\"datePublished\":\"2016-10-10T21:49:12+00:00\",\"dateModified\":\"2023-10-06T13:28:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/\"},\"wordCount\":346,\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"articleSection\":[\"08. SSL certificates\"],\"inLanguage\":\"en\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/\",\"url\":\"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/\",\"name\":\"Installing an SSL certificate in Apache + Mod SSL - Unihost.FAQ\",\"isPartOf\":{\"@id\":\"https:\/\/unihost.com\/help\/#website\"},\"datePublished\":\"2016-10-10T21:49:12+00:00\",\"dateModified\":\"2023-10-06T13:28:23+00:00\",\"description\":\"In this guide, we want to tell you about installation an SSL certificate in Apache + Mod SSL. - Unihost.FAQ\",\"breadcrumb\":{\"@id\":\"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/#breadcrumb\"},\"inLanguage\":\"en\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Unihost\",\"item\":\"https:\/\/unihost.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Help\",\"item\":\"https:\/\/unihost.com\/help\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Installing an SSL certificate in Apache + Mod SSL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/unihost.com\/help\/#website\",\"url\":\"https:\/\/unihost.com\/help\/\",\"name\":\"Unihost.FAQ\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/unihost.com\/help\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/unihost.com\/help\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/unihost.com\/help\/#organization\",\"name\":\"Unihost\",\"alternateName\":\"Unihost\",\"url\":\"https:\/\/unihost.com\/help\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"contentUrl\":\"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png\",\"width\":300,\"height\":300,\"caption\":\"Unihost\"},\"image\":{\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/unihost\/\",\"https:\/\/x.com\/unihost\",\"https:\/\/www.instagram.com\/unihost\/?hl=en\",\"https:\/\/www.linkedin.com\/company\/unihost-com\",\"https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a\",\"name\":\"Unihost Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en\",\"@id\":\"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g\",\"caption\":\"Unihost Support\"},\"sameAs\":[\"https:\/\/unihost.com\/\"],\"url\":\"https:\/\/unihost.com\/help\/author\/support\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Installing an SSL certificate in Apache + Mod SSL - Unihost.FAQ","description":"In this guide, we want to tell you about installation an SSL certificate in Apache + Mod SSL. - Unihost.FAQ","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:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/","og_locale":"en_US","og_type":"article","og_title":"Installing an SSL certificate in Apache + Mod SSL - Unihost.FAQ","og_description":"In this guide, we want to tell you about installation an SSL certificate in Apache + Mod SSL. - Unihost.FAQ","og_url":"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/","og_site_name":"Unihost.FAQ","article_publisher":"https:\/\/www.facebook.com\/unihost\/","article_published_time":"2016-10-10T21:49:12+00:00","article_modified_time":"2023-10-06T13:28:23+00:00","og_image":[{"width":250,"height":141,"url":"https:\/\/unihost.com\/help\/minio.php?.\/unihost-logo-alt.png","type":"image\/png"}],"author":"Unihost Support","twitter_card":"summary_large_image","twitter_creator":"@unihost","twitter_site":"@unihost","twitter_misc":{"Written by":"Unihost Support","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/#article","isPartOf":{"@id":"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/"},"author":{"name":"Unihost Support","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a"},"headline":"Installing an SSL certificate in Apache + Mod SSL","datePublished":"2016-10-10T21:49:12+00:00","dateModified":"2023-10-06T13:28:23+00:00","mainEntityOfPage":{"@id":"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/"},"wordCount":346,"publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"articleSection":["08. SSL certificates"],"inLanguage":"en"},{"@type":"WebPage","@id":"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/","url":"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/","name":"Installing an SSL certificate in Apache + Mod SSL - Unihost.FAQ","isPartOf":{"@id":"https:\/\/unihost.com\/help\/#website"},"datePublished":"2016-10-10T21:49:12+00:00","dateModified":"2023-10-06T13:28:23+00:00","description":"In this guide, we want to tell you about installation an SSL certificate in Apache + Mod SSL. - Unihost.FAQ","breadcrumb":{"@id":"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/#breadcrumb"},"inLanguage":"en","potentialAction":[{"@type":"ReadAction","target":["https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/unihost.com\/help\/installing-an-ssl-certificate-in-apache-mod-ssl\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Unihost","item":"https:\/\/unihost.com\/"},{"@type":"ListItem","position":2,"name":"Help","item":"https:\/\/unihost.com\/help\/"},{"@type":"ListItem","position":3,"name":"Installing an SSL certificate in Apache + Mod SSL"}]},{"@type":"WebSite","@id":"https:\/\/unihost.com\/help\/#website","url":"https:\/\/unihost.com\/help\/","name":"Unihost.FAQ","description":"","publisher":{"@id":"https:\/\/unihost.com\/help\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/unihost.com\/help\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en"},{"@type":"Organization","@id":"https:\/\/unihost.com\/help\/#organization","name":"Unihost","alternateName":"Unihost","url":"https:\/\/unihost.com\/help\/","logo":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/","url":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","contentUrl":"https:\/\/unihost.com\/help\/minio.php?2026\/01\/minio.png","width":300,"height":300,"caption":"Unihost"},"image":{"@id":"https:\/\/unihost.com\/help\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/unihost\/","https:\/\/x.com\/unihost","https:\/\/www.instagram.com\/unihost\/?hl=en","https:\/\/www.linkedin.com\/company\/unihost-com","https:\/\/www.youtube.com\/channel\/UCITKsxMDnslQY8brN3advgw"]},{"@type":"Person","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/bb5ae95f38577c920e6a7507888b715a","name":"Unihost Support","image":{"@type":"ImageObject","inLanguage":"en","@id":"https:\/\/unihost.com\/help\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a0c9db17c2a0d93e8a0d5ac123f8c5db750ad4d3d5657369c0c4e480f5af77b8?s=96&d=mm&r=g","caption":"Unihost Support"},"sameAs":["https:\/\/unihost.com\/"],"url":"https:\/\/unihost.com\/help\/author\/support\/"}]}},"_links":{"self":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/5018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/comments?post=5018"}],"version-history":[{"count":4,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/5018\/revisions"}],"predecessor-version":[{"id":16338,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/posts\/5018\/revisions\/16338"}],"wp:attachment":[{"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/media?parent=5018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/categories?post=5018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unihost.com\/help\/wp-json\/wp\/v2\/tags?post=5018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}