{"id":457,"date":"2015-05-26T06:18:06","date_gmt":"2015-05-26T11:18:06","guid":{"rendered":"http:\/\/www.g31zone.com\/?p=457"},"modified":"2015-05-26T06:18:06","modified_gmt":"2015-05-26T11:18:06","slug":"ssl-certificates-with-apache-2-on-centos","status":"publish","type":"post","link":"https:\/\/www.g31zone.com\/?p=457","title":{"rendered":"SSL Certificates with Apache 2 on CentOS"},"content":{"rendered":"<h3>Generate a Self-Signed Certificate<\/h3>\n<p>At the shell prompt, issue the following commands to install SSL for Apache and generate a certificate:<\/p>\n<p><code><br \/>\nyum install mod_ssl<br \/>\nmkdir \/etc\/httpd\/ssl<br \/>\nopenssl req -new -x509 -sha256 -days 365 -nodes -out \/etc\/httpd\/ssl\/httpd.pem -keyout \/etc\/httpd\/ssl\/httpd.key<br \/>\n<\/code><\/p>\n<h3>Configure Apache to use the Self-Signed Certificate<\/h3>\n<p><code><br \/>\nNameVirtualHost *:443<br \/>\n<VirtualHost *:443><br \/>\n    SSLEngine On<br \/>\n    SSLCertificateFile \/etc\/httpd\/ssl\/httpd.pem<br \/>\n    SSLCertificateKeyFile \/etc\/httpd\/ssl\/httpd.key<br \/>\n    ServerAdmin info@mydomain.com<br \/>\n    ServerName www.mydomain.com<br \/>\n    DocumentRoot \/srv\/www\/mydomain.com\/public_html\/<br \/>\n    ErrorLog \/srv\/www\/mydomain.com\/logs\/error.log<br \/>\n    CustomLog \/srv\/www\/mydomain.com\/logs\/access.log combined<br \/>\n<\/VirtualHost><br \/>\n<\/code><\/p>\n<p>Restart Apache:<\/p>\n<p><code><br \/>\nservice httpd restart<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Generate a Self-Signed Certificate At the shell prompt, issue the following commands to install SSL for Apache and generate a certificate: yum install mod_ssl mkdir \/etc\/httpd\/ssl openssl req -new -x509 -sha256 -days 365 -nodes -out \/etc\/httpd\/ssl\/httpd.pem -keyout \/etc\/httpd\/ssl\/httpd.key Configure Apache to use the Self-Signed Certificate NameVirtualHost *:443 SSLEngine On SSLCertificateFile \/etc\/httpd\/ssl\/httpd.pem SSLCertificateKeyFile \/etc\/httpd\/ssl\/httpd.key ServerAdmin info@mydomain.com<\/p>\n<p><a class=\"button\" href=\"https:\/\/www.g31zone.com\/?p=457\" title=\"More\">  Read More \u2192<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[166],"tags":[],"class_list":["post-457","post","type-post","status-publish","format-standard","hentry","category-centos"],"_links":{"self":[{"href":"https:\/\/www.g31zone.com\/index.php?rest_route=\/wp\/v2\/posts\/457"}],"collection":[{"href":"https:\/\/www.g31zone.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.g31zone.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.g31zone.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.g31zone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=457"}],"version-history":[{"count":1,"href":"https:\/\/www.g31zone.com\/index.php?rest_route=\/wp\/v2\/posts\/457\/revisions"}],"predecessor-version":[{"id":458,"href":"https:\/\/www.g31zone.com\/index.php?rest_route=\/wp\/v2\/posts\/457\/revisions\/458"}],"wp:attachment":[{"href":"https:\/\/www.g31zone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.g31zone.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.g31zone.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}