{"id":313,"date":"2014-08-18T14:33:39","date_gmt":"2014-08-18T21:33:39","guid":{"rendered":"https:\/\/www.domainsatretail.com\/blog\/?p=313"},"modified":"2014-08-18T14:33:39","modified_gmt":"2014-08-18T21:33:39","slug":"simplest-way-use-ssl-certificates-amazon-ec2-ubuntu-server","status":"publish","type":"post","link":"https:\/\/www.domainsatretail.com\/blog\/security\/simplest-way-use-ssl-certificates-amazon-ec2-ubuntu-server\/","title":{"rendered":"Simplest way to Use our SSL Certificates with Amazon EC2 Ubuntu Server"},"content":{"rendered":"<p>With Google&#8217;s new release of an <a href=\"\/securessl.html\">SSL Certificates<\/a> having a small ranking boost on search engine ranking, we&#8217;ve decided to release an easy tutorial on installing one of our certificates on an Amazon EC2 Ubuntu server.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-full wp-image-314\" src=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/logo-ubuntu_su-orange-hex.png\" alt=\"Ubuntu Server v14.04 LTS\" width=\"425\" height=\"210\" srcset=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/logo-ubuntu_su-orange-hex.png 425w, https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/logo-ubuntu_su-orange-hex-300x148.png 300w\" sizes=\"auto, (max-width: 425px) 100vw, 425px\" \/><\/p>\n<p>For those wanting to check their version of Ubuntu you can run: <strong>lsb_release -a<\/strong><\/p>\n<p>This is what ours returned:<\/p>\n<p><strong>Distributor ID: Ubuntu<br \/>\nDescription: Ubuntu 14.04 LTS<br \/>\nRelease: 14.04<\/strong><\/p>\n<p>So let&#8217;s dive into what needs to be done to install our Standard SSL Certificate with Amazon.<\/p>\n<div class=\"container section-title-container\" ><h3 class=\"section-title section-title-bold-center\"><b aria-hidden=\"true\"><\/b><span class=\"section-title-main\" >Open SSL Install<\/span><b aria-hidden=\"true\"><\/b><\/h3><\/div>\n<p>To check if Open SSL is installed, you can type:\u00c2 \u00c2 <strong>openssl version -a<\/strong><\/p>\n<p>This will return a version and date the open ssl software was built on. If it does not return or says openssl is not installed you will need to install it via:<\/p>\n<ul>\n<li><strong>sudo apt-get install openssl<\/strong><\/li>\n<\/ul>\n<div class=\"container section-title-container\" ><h3 class=\"section-title section-title-bold-center\"><b aria-hidden=\"true\"><\/b><span class=\"section-title-main\" >Apache 2 SSL Module<\/span><b aria-hidden=\"true\"><\/b><\/h3><\/div>\n<p>Next thing to do if you haven&#8217;t already is to enable the SSL module for Apache. This is as simple as typing:<\/p>\n<ul>\n<li><strong>sudo a2enmod ssl<\/strong><\/li>\n<\/ul>\n<p>and then restarting apache<\/p>\n<ul>\n<li><strong>sudo service apache2 restart<\/strong><\/li>\n<\/ul>\n<div class=\"container section-title-container\" ><h3 class=\"section-title section-title-bold-center\"><b aria-hidden=\"true\"><\/b><span class=\"section-title-main\" >Generating Certificate Signing Request (CSR)<\/span><b aria-hidden=\"true\"><\/b><\/h3><\/div>\n<p>You will need to generate a CSR that will be entered in our SSL certificates management console. Here are the steps on an Amazon Ubuntu Server:<\/p>\n<p>SSH into your server using Putty (in Windows) or via Terminal (in Mac or Linux).<\/p>\n<p>We will want to create a couple of directories to store the various files, like so:<\/p>\n<ul>\n<li><strong>mkdir \/etc\/apache2\/ssl<\/strong><\/li>\n<li><strong>mkdir \/etc\/apache2\/ssl\/private<\/strong><\/li>\n<li><strong>cd \/etc\/apache2\/ssl\/<\/strong><\/li>\n<\/ul>\n<p>Then you type this command to actually generate the CSR that will be going into the admin panel.<\/p>\n<ul>\n<li><strong>sudo openssl req -new -newkey rsa:2048 -nodes -keyout website.key -out website.csr<\/strong><\/li>\n<\/ul>\n<p>It will begin to generate and ask your for the following info &#8212; Country Name, State, Locality Name, Organization Name, Unit, Common Name (domain) and email address. For more information on what to input here visit <a href=\"http:\/\/help.securepaynet.net\/article\/5343?locale=en\" target=\"_blank\">this help article<\/a>.<\/p>\n<p>Your csr is now done, and ready to have the information copied. To do this you would type<\/p>\n<ul>\n<li><strong>sudo nano \/etc\/apache2\/ssl\/website.csr<\/strong><\/li>\n<\/ul>\n<p>and then copy that into the next section within the Domains at Retail SSL Management panel\u00c2 when required.<\/p>\n<div class=\"container section-title-container\" ><h3 class=\"section-title section-title-bold-center\"><b aria-hidden=\"true\"><\/b><span class=\"section-title-main\" >SSL Management Screen - Create Certificate<\/span><b aria-hidden=\"true\"><\/b><\/h3><\/div>\n<p>Now to the part where you generate the SSL files through our Admin Panel. Assuming you have already purchased a SSL from our site, you may log in and then go to your Accounts page. From there find the SSL section and click Launch<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-320\" src=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/LaunchSSL-ManagementScreen.jpg\" alt=\"Launch SSL Management Screen\" width=\"952\" height=\"179\" srcset=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/LaunchSSL-ManagementScreen.jpg 952w, https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/LaunchSSL-ManagementScreen-300x56.jpg 300w\" sizes=\"auto, (max-width: 952px) 100vw, 952px\" \/><\/p>\n<p>Upon launching, you will want to set the SSL to use a <strong>Third Party, Dedicated Server or Virtual Dedicated Server<\/strong> option. Note, this would also work when setting up ssl for different providers other than Amazon, such as Rack space. We&#8217;re just focusing on Amazon for this blog post, due to its popularity.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-321\" src=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-ThirdParty-Amazon.jpg\" alt=\"SSL Third Party Amazon\" width=\"728\" height=\"528\" srcset=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-ThirdParty-Amazon.jpg 728w, https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-ThirdParty-Amazon-300x217.jpg 300w\" sizes=\"auto, (max-width: 728px) 100vw, 728px\" \/><\/p>\n<p>In the &#8220;Enter your CSR below&#8221; we will want to paste in the contents of the &#8220;website.csr&#8221; file we created earlier in the process. From there click to agree to the terms and conditions, and click Next.<\/p>\n<p>The next step will require a Domain Validation option to be selected (Note: Deluxe and Premium SSL may slightly differ in the process). We selected to do the &#8220;Domain Control Email&#8221; option, as we find it easier to upload a file to our website to verify than confirm via email. Others may prefer the verify by email selection as highlighted below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-323\" src=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-Domain-Validation-Step.jpg\" alt=\"SSL Domain Validation Step\" width=\"719\" height=\"521\" srcset=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-Domain-Validation-Step.jpg 719w, https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-Domain-Validation-Step-300x217.jpg 300w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<p>You will then receive confirmation that your SSL is setup.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-325\" src=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-ThirdParty-Confirmation.jpg\" alt=\"SSL Third Party Confirmation Screen\" width=\"731\" height=\"407\" srcset=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-ThirdParty-Confirmation.jpg 731w, https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-ThirdParty-Confirmation-300x167.jpg 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<p>At this point you will receive a couple emails with next steps on verification &#8212; either via email or doing the website domain control option. Here are the steps for doing the domain control option:<\/p>\n<div class=\"container section-title-container\" ><h3 class=\"section-title section-title-bold-center\"><b aria-hidden=\"true\"><\/b><span class=\"section-title-main\" >Domain Control Email Validation<\/span><b aria-hidden=\"true\"><\/b><\/h3><\/div>\n<p>From the My account screen, click the SSL certificates tab and click Launch to get and select the certificate you just setup. You will see the following status:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-326\" src=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/Domain-Confirmation-Status.jpg\" alt=\"Domain SSL Confirmation Status\" width=\"881\" height=\"268\" srcset=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/Domain-Confirmation-Status.jpg 881w, https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/Domain-Confirmation-Status-300x91.jpg 300w\" sizes=\"auto, (max-width: 881px) 100vw, 881px\" \/><\/p>\n<p>From there click the &#8220;Whats the hold up?&#8221; and you can start the validation. Here it will give you instructions to download the verification file under &#8220;<strong>Website Control<\/strong>&#8221; and after it has been uploaded to your site, click <strong>Verify the domain<\/strong>. You will get a green message indicating it was successful.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-327\" src=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/Domain-Control-Email-Response-SSL-Verification.jpg\" alt=\"Domain Control Email Response SSL Verification\" width=\"617\" height=\"518\" srcset=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/Domain-Control-Email-Response-SSL-Verification.jpg 617w, https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/Domain-Control-Email-Response-SSL-Verification-300x251.jpg 300w\" sizes=\"auto, (max-width: 617px) 100vw, 617px\" \/><\/p>\n<p>Your certificate is now complete and will show in your Secure Certificate Services management area. Here is what to expect to see:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-328\" src=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-Certificate-Issued.jpg\" alt=\"SSL Certificate Issued\" width=\"882\" height=\"234\" srcset=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-Certificate-Issued.jpg 882w, https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-Certificate-Issued-300x79.jpg 300w\" sizes=\"auto, (max-width: 882px) 100vw, 882px\" \/><\/p>\n<p>At this point you will need to download the files by clicking the Download arrow, where you will see this screen &#8212; since we are doing an Amazon EC2 Ubuntu server, we are running Apache and want to ensure we select that in the dropdown:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-329\" src=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-Download-For-Apache-Server.jpg\" alt=\"SSL Download For Apache Server\" width=\"501\" height=\"309\" srcset=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-Download-For-Apache-Server.jpg 501w, https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/SSL-Download-For-Apache-Server-300x185.jpg 300w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/p>\n<div class=\"container section-title-container\" ><h3 class=\"section-title section-title-bold-center\"><b aria-hidden=\"true\"><\/b><span class=\"section-title-main\" >Adding SSL Files to Amazon Server<\/span><b aria-hidden=\"true\"><\/b><\/h3><\/div>\n<p>Using a program like WinSCP or program of choice to get files onto your Amazon Server, upload the files you just downloaded. In our case there were two files in the zip &#8212; both &#8220;.crt&#8221; files &#8212; our main one &#8220;file1.crt&#8221; and a sf_bundle-g2-g1.crt file. They should be uploaded to the <strong>\/etc\/apache2\/ssl\/<\/strong> folder as created in our earlier steps.<\/p>\n<div class=\"container section-title-container\" ><h3 class=\"section-title section-title-bold-center\"><b aria-hidden=\"true\"><\/b><span class=\"section-title-main\" >Adding SSL VirtualHost Entries<\/span><b aria-hidden=\"true\"><\/b><\/h3><\/div>\n<p>At this point, all we need to do is enable the VHOST for our site to render the SSL pages. You will either need to create a new VHOST entry if its a new site, or add this to an existing entry for your site.<\/p>\n<p>&lt;VirtualHost *:443&gt;<\/p>\n<p>ServerName website.com<br \/>\nServerAlias www.website.com<br \/>\nDocumentRoot \/documentroot\/<br \/>\nSSLEngine on<br \/>\nSSLCertificateFile \/etc\/apache2\/ssl\/file1.crt<br \/>\nSSLCertificateKeyFile \/etc\/apache2\/ssl\/private\/website.key<br \/>\nSSLCertificateChainFile \/etc\/apache2\/ssl\/sf_bundle-g2-g1.crt<\/p>\n<p>&lt;\/VirtualHost&gt;<\/p>\n<p>Website.key is the one we created in the beginning steps. File1.crt will be named something like 12aaaa12.crt when downloaded. Name this to whatever you have received. The SSL Chain File is required to work as well, which is the second file included in the download.<\/p>\n<p>Ensure to restart apache: <strong>sudo service apache2 restart<\/strong><\/p>\n<div class=\"container section-title-container\" ><h3 class=\"section-title section-title-bold-center\"><b aria-hidden=\"true\"><\/b><span class=\"section-title-main\" >Enable SSL Traffic on Amazon EC2<\/span><b aria-hidden=\"true\"><\/b><\/h3><\/div>\n<p>One last step is to ensure SSL traffic is enabled or your security group in Amazon. By default, Amazon does not enable this as not all sites will need it. Log in to your Amazon account, go to EC2 and your server instance. From their click on the Security Group assigned to your site, and enable HTTPs traffic for Inbound.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-331\" src=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/Amazon-Enabled-HTTPS-Traffic.jpg\" alt=\"Amazon Enabled HTTPS Traffic\" width=\"780\" height=\"251\" srcset=\"https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/Amazon-Enabled-HTTPS-Traffic.jpg 780w, https:\/\/www.domainsatretail.com\/blog\/wp-content\/uploads\/2014\/08\/Amazon-Enabled-HTTPS-Traffic-300x96.jpg 300w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/p>\n<p>Load your site and you should now be able to run https! Just make sure to redirect any http url&#8217;s to https, so your not serving the same content up twice by mistake, as this would be bad for SEO and hurt your Google rankings. One main reason to add SSL is for Google rankings &#8212; we don&#8217;t want to gain a little, and lose our seo by serving duplicate content.<\/p>\n<p>Any questions? Problems getting it setup? Send us a tweet <a href=\"https:\/\/twitter.com\/domainsatretail\">@domainsatretail<\/a>!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With Google&#8217;s new release of an SSL Certificates having a small ranking boost on search engine ranking, we&#8217;ve decided to release an easy tutorial on installing one of our certificates on an Amazon EC2 Ubuntu server. For those wanting to check their version of Ubuntu you can run: lsb_release -a This is what ours returned: [&#8230;]\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[],"class_list":["post-313","post","type-post","status-publish","format-standard","hentry","category-security"],"_links":{"self":[{"href":"https:\/\/www.domainsatretail.com\/blog\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.domainsatretail.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.domainsatretail.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.domainsatretail.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.domainsatretail.com\/blog\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":17,"href":"https:\/\/www.domainsatretail.com\/blog\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":342,"href":"https:\/\/www.domainsatretail.com\/blog\/wp-json\/wp\/v2\/posts\/313\/revisions\/342"}],"wp:attachment":[{"href":"https:\/\/www.domainsatretail.com\/blog\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.domainsatretail.com\/blog\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.domainsatretail.com\/blog\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}