{"id":5454,"date":"2023-11-16T10:11:26","date_gmt":"2023-11-16T10:11:26","guid":{"rendered":"https:\/\/natsav.com\/blog\/?p=5454"},"modified":"2024-02-06T12:25:26","modified_gmt":"2024-02-06T12:25:26","slug":"install-ssl-in-centos","status":"publish","type":"post","link":"https:\/\/natsav.com\/blog\/install-ssl-in-centos\/","title":{"rendered":"How to Install SSL in Centos Server."},"content":{"rendered":"<p>Here are the general steps to install SSL on a CentOS server.<\/p>\n<p><strong>Step 1<\/strong>: <strong>Install OpenSSL.<br \/>\n<\/strong>Ensure that OpenSSL is installed on the CentOS server. You can install it using the following command:-<br \/>\n[ sudo yum install openssl ]<\/p>\n<p><strong>Step 2 : Generate a Private Key and CSR.<br \/>\n<\/strong>a). Use the <code>\"openssl\"<\/code> command to generate a private key and a CSR. Replace <code>'your_domain'<\/code> with your actual domain name:-<br \/>\n[ openssl req -newkey rsa:2048 -nodes -keyout your_domain.key -out your_domain.csr ]<br \/>\nb). Follow the prompts to enter the required information, including the Common Name (CN), which should be your domain name.<\/p>\n<p><strong>Step 3 : Submit CSR to a Certificate Authority (CA) or Use a Self-Signed Certificate.<br \/>\n<\/strong>a). If you are obtaining an SSL certificate from a trusted CA, submit the CSR to them and follow their process for certificate\u00a0 issuance.<br \/>\nb). If you are using a self-signed certificate for testing or internal use, you can generate a self-signed certificate using the following command:<br \/>\n[ openssl x509 -req -days 365 &#8211;<span class=\"hljs-keyword\">in<\/span> your_domain.csr -signkey your_domain.key -out your_domain.crt ]<\/p>\n<p><strong>Step 4:<\/strong> <strong>Configure Apache to Use SSL.<br \/>\n<\/strong>a). Update your Apache configuration to enable SSL. Edit the Apache configuration file, usually located in \u00a0\u00a0<code>\"\/etc\/httpd\/conf\/httpd.conf\"<\/code> or <code>\"\/etc\/httpd\/conf.d\/ssl.conf\"<\/code>.<\/p>\n<p>b). Make sure to replace <code>\"your_domain.com\"<\/code>, <code>\"\/path\/to\/your_domain.crt\"<\/code>, and <code>\"\/path\/to\/your_domain.key\"<\/code> with your actual domain and file paths.<\/p>\n<p><strong>Step 5:<\/strong> <strong>Restart Apache.<br \/>\n<\/strong>After making the changes, restart Apache to apply the new configuration by the following command.<br \/>\n[ sudo systemctl restart httpd ]<\/p>\n<p><strong>Conclusion:<\/strong> Now, your Apache web server should be configured to use SSL. Access your site using &#8220;<code>https:\/\/your_domain.com\"<\/code> to verify that SSL is working correctly.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here are the general steps to install SSL on a CentOS server. Step 1: Install OpenSSL. Ensure that OpenSSL is installed on the CentOS server. You can install it using the following command:- [ sudo yum install openssl ] Step 2 : Generate a Private Key and CSR. a). Use the &#8220;openssl&#8221; command to generate [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5456,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[256],"tags":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/natsav.com\/blog\/wp-content\/uploads\/2023\/11\/SSL--e1700129436789.jpg?fit=919%2C648&ssl=1","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5454"}],"collection":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/comments?post=5454"}],"version-history":[{"count":3,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5454\/revisions"}],"predecessor-version":[{"id":5459,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5454\/revisions\/5459"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media\/5456"}],"wp:attachment":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media?parent=5454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/categories?post=5454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/tags?post=5454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}