{"id":65,"date":"2012-02-22T04:28:00","date_gmt":"2012-02-22T04:28:00","guid":{"rendered":"http:\/\/pheonixsolutions.com\/?p=65"},"modified":"2012-06-20T10:35:28","modified_gmt":"2012-06-20T10:35:28","slug":"setting-up-an-ssl-website-in-centosubuntu-if-there-is-no-control-panel","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/setting-up-an-ssl-website-in-centosubuntu-if-there-is-no-control-panel\/","title":{"rendered":"Setting up an SSL website in CentOS\/Ubuntu if there is no control panel"},"content":{"rendered":"<div style=\"text-align: left;\" dir=\"ltr\">This guide will explain how to set up a site over https.1. Get the required software<br \/>\n~~~~~~~~~~~~~~~~~<br \/>\nFor an SSL encrypted web server you will need a few things. Depending on your install you may or may not have OpenSSL and mod_ssl, Apache&#8217;s interface to OpenSSL.<\/p>\n<p>Use yum to install following, if centos<\/p>\n<p>======================<br \/>\nyum install mod_ssl openssl<br \/>\n======================<\/p>\n<p>Use apt-get to install following, if ubuntu<\/p>\n<p>========================<br \/>\napt-get install apache2 apache2-common;<br \/>\n========================<\/p>\n<p>Now run following command in ubuntu to enable mod_ssl<\/p>\n<p>================<br \/>\na2enmod ssl<br \/>\n================<\/p>\n<p>Yum will either tell you they are installed or will install them for you.<\/p>\n<p>2. Generate CSR &amp; purchase SSL<br \/>\n~~~~~~~~~~~~~~~~~~~~~<br \/>\nGet it done as per following KB article.<\/p>\n<p>[ article:832 ]Generating CSR for Customers &amp; Guidelines for SSL installation requests<\/p>\n<p>3. Create \/etc\/httpd\/conf.d\/example.com.conf, if centos.<\/p>\n<p>If ubuntu, create \/etc\/apache2\/sites-available\/example.com. Now, run following command.<\/p>\n<p>================<br \/>\na2ensite example.com<br \/>\n================<\/p>\n<p>Now, add following contents in \/etc\/httpd\/conf.d\/example.com.conf or \/etc\/apache2\/sites-available\/example.com.<\/p>\n<p>==============================<br \/>\nNameVirtualHost 192.168.1.56:443<\/p>\n<p>ServerAdmin admin@example.com<br \/>\nDocumentRoot \/var\/www\/html\/example_www\/<br \/>\nServerName server1.example.com<br \/>\nServerAlias www.example.com<br \/>\nErrorLog logs\/example.com-error_log<br \/>\nCustomLog logs\/example.com-access_log common<\/p>\n<p>Allowoverride All<\/p>\n<p>NameVirtualHost 192.168.1.56:443<\/p>\n<p>SSLEngine on<br \/>\nSSLCertificateFile \/etc\/ssl\/example.com.crt<br \/>\nSSLCertificateKeyFile \/etc\/ssl\/example.com.key<br \/>\nSSLCACertificateFile \/etc\/ssl\/example.com.ca<\/p>\n<p>Allowoverride All<br \/>\nServerAdmin admin@example.com<br \/>\nDocumentRoot \/var\/www\/html\/example_com_www\/<br \/>\nServerName server1.example.com<br \/>\nServerAlias www.example.com<br \/>\nErrorLog logs\/example.com-error_log<br \/>\nCustomLog logs\/example.com-access_log common<br \/>\n===============================<\/p>\n<p>Make sure following.<\/p>\n<p>(i) IP 192.168.1.56 is replaced with correct IP address<br \/>\n(ii) example.com is replaced with correct domain name<br \/>\n(iii) document root is \/var\/www\/html\/example_com_www\/<\/p>\n<p>3. Create \/etc\/ssl\/<\/p>\n<p>4. Save Cert, Key &amp; Intermediate CA as given below.<\/p>\n<p>Cert: \/etc\/ssl\/example.com.crt<br \/>\nKey: \/etc\/ssl\/example.com.key<br \/>\nIntermediate CA: \/etc\/ssl\/example.com.ca<\/p>\n<p>\/etc\/init.d\/httpd restart [ centos]<br \/>\n\/etc\/init.d\/apache2 restart [ubuntu]<\/p>\n<p>5. Access website using https:\/\/192.168.1.56:443 and ensure that it is working fine.<\/p>\n<p>Ubuntu reference: https:\/\/help.ubuntu.com\/10.04\/serverguide\/C\/httpd.html<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>This guide will explain how to set up a site over https.1. Get the required software ~~~~~~~~~~~~~~~~~ For an SSL [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1024],"tags":[207,206],"class_list":["post-65","post","type-post","status-publish","format-standard","hentry","category-security","tag-no-control-panel","tag-ssl-certificate-installation","psol-cat-security"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-13","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/65","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=65"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/65\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=65"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=65"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=65"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}