{"id":2005,"date":"2025-08-06T18:00:53","date_gmt":"2025-08-06T18:00:53","guid":{"rendered":"https:\/\/certpanel.com\/resources\/?page_id=2005"},"modified":"2025-08-06T18:00:53","modified_gmt":"2025-08-06T18:00:53","slug":"how-to-install-an-ssl-certificate-on-centos-7-apache","status":"publish","type":"page","link":"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/","title":{"rendered":"How to Install an SSL Certificate on CentOS 7 (Apache)"},"content":{"rendered":"\n<p>Securing your CentOS 7 server with an SSL certificate ensures encrypted data transfer and builds trust with your users. In this step-by-step guide, we&#8217;ll cover two approaches to install an SSL certificate on <strong>CentOS 7 using Apache HTTP server (httpd)<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>the <strong>manual method<\/strong><\/li>\n\n\n\n<li>the <strong>automatic method using CertPanel AutoInstall SSL<\/strong>.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Requirements Before You Begin<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A CentOS 7 server with the Apache HTTP server (httpd) installed<\/li>\n\n\n\n<li>Root or sudo privileges<\/li>\n\n\n\n<li>A valid SSL\/TLS certificate from a publicly trusted certificate authority (CA)<\/li>\n<\/ul>\n\n\n\n<p>If you don\u2019t have an SSL certificate, you can get one from us at some of the best prices on the internet.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/certpanel.com\/ssl-certificates\">Shop SSL Certificates<\/a><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Method 1: Manual Installation on Apache (CentOS 7)<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Generate a CSR and Private Key for Your Domain<\/strong><\/h3>\n\n\n\n<p>If you haven&#8217;t already, generate a certificate signing request (CSR) and private key using OpenSSL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openssl req -new -newkey rsa:2048 -nodes -keyout security.test.site.key -out securitytest_site.csr<\/code><\/pre>\n\n\n\n<p>Follow the prompts to enter your domain details.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"428\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create_csr_private_key_apache-1024x428.jpg\" alt=\"A screenshot showing the commands to use when creating a csr and private key in CentOS Apache\" class=\"wp-image-1993\" srcset=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create_csr_private_key_apache-1024x428.jpg 1024w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create_csr_private_key_apache-300x125.jpg 300w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create_csr_private_key_apache-768x321.jpg 768w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create_csr_private_key_apache-1536x642.jpg 1536w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create_csr_private_key_apache.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Image caption<\/strong>: Examples of the commands and required information fields when creating a CSR and private key using OpenSSL on CentOS 7.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Upload the CSR to CertPanel and Complete Validation<\/strong><\/h3>\n\n\n\n<p>This next step involves sending your certificate signing request to your certificate provider. If you\u2019ve purchased a certificate from us, you can submit the CSR via the CertPanel dashboard.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log into <a href=\"https:\/\/www.certpanel.com\/\">CertPanel<\/a>.<\/li>\n\n\n\n<li>Click <strong>Add Domain<\/strong> and upload your .csr file.<\/li>\n\n\n\n<li>Select a method of domain control validation (ideally, using DNS CNAME or HTTP file-based methods).<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"244\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/domain_verification_method-certpanel2-1024x244.png\" alt=\"A screenshot of where to select your preferred domain control validation (DCV) method\" class=\"wp-image-1994\" srcset=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/domain_verification_method-certpanel2-1024x244.png 1024w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/domain_verification_method-certpanel2-300x71.png 300w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/domain_verification_method-certpanel2-768x183.png 768w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/domain_verification_method-certpanel2-1536x366.png 1536w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/domain_verification_method-certpanel2.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong><em>Image caption<\/em><\/strong><em>: A screenshot showing where you can select your preferred method (e.g., file-based validation for non-wildcard SSL\/TLS certificates).<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"549\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/certificate-signing-request-example-1024x549.jpg\" alt=\"A redacted example of a certificate signing request (CSR)\" class=\"wp-image-1995\" srcset=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/certificate-signing-request-example-1024x549.jpg 1024w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/certificate-signing-request-example-300x161.jpg 300w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/certificate-signing-request-example-768x412.jpg 768w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/certificate-signing-request-example-1536x824.jpg 1536w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/certificate-signing-request-example.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Image caption<\/strong>: A redacted screenshot of CSR certificate contents, which includes the &#8212;&#8211;BEGIN CERTIFICATE REQUEST&#8212;&#8211; and &#8212;&#8211;END CERTIFICATE REQUEST&#8212;&#8211; information tags.<\/figcaption><\/figure>\n\n\n\n<p>Once the domain is verified, download the issued certificate bundle, which includes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Domain certificate:<\/strong> securitytest_site.crt<\/li>\n\n\n\n<li><strong>CA certificate bundle (intermediate chain):<\/strong> My_CA_Bundle.ca-bundle<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Upload Your SSL Certificate and Key Files to the CentOS Server<\/strong><\/h3>\n\n\n\n<p>Use <em>scp<\/em> (the secure copy protocol) or tools like WinSCP to transfer these files from your local system to the server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>scp securitytest_site.crt ec2-user@your_server_ip:\/home\/ec2-user\/\nscp My_CA_Bundle.ca-bundle ec2-user@your_server_ip:\/home\/ec2-user\/\nscp security.test.site.key ec2-user@your_server_ip:\/home\/ec2-user\/<\/code><\/pre>\n\n\n\n<p>Then move them into appropriate system directories using the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mv securitytest_site.crt \/etc\/pki\/tls\/certs\/\nsudo mv My_CA_Bundle.ca-bundle \/etc\/pki\/tls\/certs\/\nsudo mv security.test.site.key \/etc\/pki\/tls\/private\/<\/code><\/pre>\n\n\n\n<p><a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-set-permissions-linux\">Set the correct permissions<\/a> for the specified files:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo chmod 644 \/etc\/pki\/tls\/certs\/*.crt\nsudo chmod 600 \/etc\/pki\/tls\/private\/*.key<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Create a FullChain File Required by Apache<\/strong><\/h3>\n\n\n\n<p>Apache expects a complete certificate chain for proper SSL validation. Combine your domain certificate and CA bundle using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo bash -c 'cat \/etc\/pki\/tls\/certs\/securitytest_site.crt \/etc\/pki\/tls\/certs\/My_CA_Bundle.ca-bundle &gt; \/etc\/pki\/tls\/certs\/fullchain.pem'<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"119\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create-fullchain-pem-1024x119.jpg\" alt=\"A terminal screeshot illustrating how to create a fullchain file by combining the server certificate and CA bundle file\" class=\"wp-image-1996\" srcset=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create-fullchain-pem-1024x119.jpg 1024w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create-fullchain-pem-300x35.jpg 300w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create-fullchain-pem-768x89.jpg 768w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create-fullchain-pem-1536x179.jpg 1536w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/create-fullchain-pem.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Image caption<\/strong>: You can create the fullchain.pem file by combining the server certificate and CA bundle file.<\/figcaption><\/figure>\n\n\n\n<p>Alternatively, if you\u2019re running an older version of Apache and need to upload the separate files, you can do so using the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SSLCertificateFile \/etc\/httpd\/conf.d\/yourdomain.crt\nSSLCertificateChainFile \/etc\/httpd\/conf.d\/ca_bundle.ca-bundle\nSSLCertificateKeyFile \/etc\/httpd\/conf.d\/private.key<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5: Update Apache Configuration to Use the SSL Certificate<\/strong><\/h3>\n\n\n\n<p>To enable SSL in Apache2 CentOS 7, you must edit the Apache SSL configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo nano \/etc\/httpd\/conf.d\/ssl.conf<\/code><\/pre>\n\n\n\n<p>In it, replace or update the <em>&lt;VirtualHost *:443&gt;<\/em> block to include the specified <em>SSLCertificateFile<\/em> and <em>SSLCertificateKeyFile<\/em> information:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;VirtualHost *:443&gt;\n    ServerName securitytest.site\n    DocumentRoot \/var\/www\/html\n\n    SSLEngine on\n    SSLCertificateFile \/etc\/pki\/tls\/certs\/fullchain.pem\n    SSLCertificateKeyFile \/etc\/pki\/tls\/private\/security.test.site.key\n\n    ErrorLog \/var\/log\/httpd\/securitytest.site.error.log\n    CustomLog \/var\/log\/httpd\/securitytest.site.access.log combined\n&lt;\/VirtualHost&gt;<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"351\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/set-virtualhost-block-with-fullchain-1024x351.jpg\" alt=\"A screenshot showing how to configure the VirtualHost block with the fullchain.pem file\" class=\"wp-image-1997\" srcset=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/set-virtualhost-block-with-fullchain-1024x351.jpg 1024w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/set-virtualhost-block-with-fullchain-300x103.jpg 300w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/set-virtualhost-block-with-fullchain-768x264.jpg 768w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/set-virtualhost-block-with-fullchain-1536x527.jpg 1536w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/set-virtualhost-block-with-fullchain.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Image caption<\/strong>: An example of an Apache server that\u2019s configured to use SSL with the fullchain bundle and key.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 6: Check Apache Configuration for Syntax Errors<\/strong><\/h3>\n\n\n\n<p>Run the following command to test your configuration file for any issues:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apachectl configtest<\/code><\/pre>\n\n\n\n<p>Here&#8217;s what you should expect to see:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Syntax OK<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"79\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/configtest-syntax-ok-confirmation-1024x79.png\" alt=\"A terminal displaying the results of the configtest, showing the syntax is OK\" class=\"wp-image-1998\" srcset=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/configtest-syntax-ok-confirmation-1024x79.png 1024w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/configtest-syntax-ok-confirmation-300x23.png 300w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/configtest-syntax-ok-confirmation-768x59.png 768w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/configtest-syntax-ok-confirmation-1536x118.png 1536w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/configtest-syntax-ok-confirmation-2048x158.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Image caption<\/strong>: An example terminal showing the \u201cSyntax OK\u201d message, indicating that the syntax test passed successfully.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 7: Restart Apache and Enable it on Boot<\/strong><\/h3>\n\n\n\n<p>Restart your Apache server to apply the changes to its SSL configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart httpd<\/code><\/pre>\n\n\n\n<p>Enable Apache to run at startup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl enable httpd<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 8: Verify HTTPS Access in a Browser<\/strong><\/h3>\n\n\n\n<p>Once you\u2019ve rebooted your web server, you&#8217;ll want to test your domain in a browser to see whether HTTPS is enabled. If it is, you should see a secure padlock \ud83d\udd12 in the address bar (deending on the browser) or a message stating that your connection is secure.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"427\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-https-centos-apache-1024x427.jpg\" alt=\"A test of the HTTPS being enabled on a server after installing an SSL certificate on CentOS 7 Apache\" class=\"wp-image-1999\" srcset=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-https-centos-apache-1024x427.jpg 1024w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-https-centos-apache-300x125.jpg 300w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-https-centos-apache-768x320.jpg 768w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-https-centos-apache-1536x640.jpg 1536w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-https-centos-apache.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Image caption<\/strong>: A screenshot of a test website displaying the HTTPS secure padlock, which indicates that the website has SSL\/TLS enabled.<\/figcaption><\/figure>\n\n\n\n<p>To troubleshoot, test SSL using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>openssl s_client -connect &lt;website&gt;:443 -servername &lt;website&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Method 2: Automatic SSL Installation Using CertPanel on CentOS 7<\/strong><\/h2>\n\n\n\n<p>CertPanel simplifies SSL deployment with an auto-install script for Apache. Here\u2019s how to use it:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Add Your Domain in CertPanel<\/strong><\/h3>\n\n\n\n<p>Log into <a href=\"https:\/\/www.certpanel.com\/\">CertPanel<\/a>, click <strong>Add Domain<\/strong>, and follow the prompts.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/certpanel.com\/autoinstall-ssl\">Get AutoInstall SSL<\/a><\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"466\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/specify-ssl-install-method-centos7-apache-certpanel-1024x466.jpg\" alt=\"Where you can select your preferred Linux version (Apache) in CertPanel for installing AutoInstall SSL\" class=\"wp-image-2000\" srcset=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/specify-ssl-install-method-centos7-apache-certpanel-1024x466.jpg 1024w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/specify-ssl-install-method-centos7-apache-certpanel-300x137.jpg 300w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/specify-ssl-install-method-centos7-apache-certpanel-768x349.jpg 768w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/specify-ssl-install-method-centos7-apache-certpanel-1536x699.jpg 1536w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/specify-ssl-install-method-centos7-apache-certpanel.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Image caption<\/strong>: A screenshot showing how to add AutoInstall SSL for your domain in the CertPanel dashboard.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Complete Domain Verification and CSR Process<\/strong><\/h3>\n\n\n\n<p>CertPanel will walk you through the processes of generating a CSR and verifying your domain ownership (via DNS or file-based validation). To start the process, select your server type as shown below, as shown in the screenshot below:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"460\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/autoinstall-ssl-web-server-selection.jpg\" alt=\"An example of where to select the web server when preparing to install CertPanel AutoInstall SSL\" class=\"wp-image-2001\" style=\"width:544px;height:auto\" srcset=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/autoinstall-ssl-web-server-selection.jpg 700w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/autoinstall-ssl-web-server-selection-300x197.jpg 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><figcaption class=\"wp-element-caption\"><strong>Image caption<\/strong>: A screenshot showing how to choose your server OS in the CertPanel dashboard.<\/figcaption><\/figure>\n\n\n\n<p>Next, select your preferred method of domain control validation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/image-7.png\" alt=\"An example file validation \" class=\"wp-image-1987\"\/><figcaption class=\"wp-element-caption\"><strong>Image caption<\/strong>: A screenshots showing how to choose your domain validation method in the CertPanel dashboard.<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Download and Run the Apache Auto-Install Script<\/strong><\/h3>\n\n\n\n<p>Once verified, CertPanel will generate a customized install script that automatically:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Installs the certificate,<\/li>\n\n\n\n<li>Creates and configures the SSL virtual host, and<\/li>\n\n\n\n<li>Restarts the Apache service.<\/li>\n<\/ul>\n\n\n\n<p>To initiate this process, all you must do is enter the following command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo wget -qO - https:\/\/files.autoinstallssl.com\/packages\/linux\/version\/latest\/get.autoinstallssl.sh | sudo bash -s<\/code><\/pre>\n\n\n\n<p>To execute it, enter the following command, which will include your AutoInstall SSL token:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo runautoinstallssl.sh installcertificate --token &lt;tokenvalue&gt; --includewww --validationtype file --validationprovider filesystem<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"648\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/autoinstall-ssl-centos7-apache-terminal-1024x648.jpg\" alt=\"A screenshot of an Apache terminal displaying the execution of the CertPanel AutoInstall SSL installation script\" class=\"wp-image-2002\" srcset=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/autoinstall-ssl-centos7-apache-terminal-1024x648.jpg 1024w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/autoinstall-ssl-centos7-apache-terminal-300x190.jpg 300w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/autoinstall-ssl-centos7-apache-terminal-768x486.jpg 768w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/autoinstall-ssl-centos7-apache-terminal-1536x972.jpg 1536w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/autoinstall-ssl-centos7-apache-terminal.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Image caption<\/strong>: <em>A screenshot of an auto-installation script running on CentOS 7 to configure SSL.Once this is done, simply visit your site to check whether your site is listed as secure in your preferred browser.<\/em><\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"448\" src=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-server-ssl-certificate-installation-using-autoinstall-ssl-1024x448.jpg\" alt=\"A screenshot showing what happens after AutoInstall SSL successfully installs an SSL certificate using automation\" class=\"wp-image-2003\" srcset=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-server-ssl-certificate-installation-using-autoinstall-ssl-1024x448.jpg 1024w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-server-ssl-certificate-installation-using-autoinstall-ssl-300x131.jpg 300w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-server-ssl-certificate-installation-using-autoinstall-ssl-768x336.jpg 768w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-server-ssl-certificate-installation-using-autoinstall-ssl-1536x672.jpg 1536w, https:\/\/certpanel.com\/resources\/wp-content\/uploads\/test-server-ssl-certificate-installation-using-autoinstall-ssl.jpg 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\"><strong>Image caption:<\/strong> A screenshot showing the successful installation of the SSL certificate on a CentOS 7 Apache server using AutoInstall SSL.<\/figcaption><\/figure>\n\n\n\n<p>That&#8217;s it! As you can see, using AutoInstall SSL to install an SSL certificate on a CentOS 7 Apache server is fast and easy. SSL automation gives you back a lot of time that can be spent on other tasks that require your human ingenuity, skills, and critical thinking.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common Questions and Troubleshooting<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Why does Apache return a \u2018<\/strong><strong>Failed to configure CA certificate chain\u2019 message<\/strong><strong>?<\/strong><\/h3>\n\n\n\n<p>This error typically inicates one of the following issues:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your CA chain file is missing or incorrect<\/li>\n\n\n\n<li>The fullchain file (if you used one) is incomplete or misconfigured<\/li>\n<\/ul>\n\n\n\n<p>Ensure the certificate and chain are properly combined as shown in <strong>Step 2<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Can I use a combined fullchain instead of separate files?<\/strong><\/h3>\n\n\n\n<p>Yes! Doing so is recommended for modern Apache versions (although it\u2019s not technically a requirement). Run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo bash -c 'cat \/etc\/pki\/tls\/certs\/securitytest_site.crt \/etc\/pki\/tls\/certs\/My_CA_Bundle.ca-bundle &gt; \/etc\/pki\/tls\/certs\/fullchain.pem'<\/code><\/pre>\n\n\n\n<p>Then update your Apache config:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SSLCertificateFile \/etc\/pki\/tls\/certs\/fullchain.pem<\/code><\/pre>\n\n\n\n<p>You can remove SSLCertificateChainFile if using the fullchain.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What if my browser says the site is still &#8220;Not Secure&#8221;?<\/strong><\/h3>\n\n\n\n<p>Try the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Clear browser cache or test in Incognito<\/li>\n\n\n\n<li>Review Apache logs: <em>sudo tail -n 30 \/var\/log\/httpd\/securitytest.site.error.log<\/em><\/li>\n\n\n\n<li>Use <em>openssl s_client<\/em> to verify the SSL chain<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Tips for Managing and Renewing SSL on CentOS<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Renew your SSL\/TLS certificate 30 days before it\u2019s set to expire.<\/strong><\/li>\n\n\n\n<li>Use <strong>CertPanel\u2019s auto-renew<\/strong> feature to avoid manual reconfiguration<\/li>\n\n\n\n<li>Always back up your <em>.crt<\/em>, <em>.key<\/em>, and <em>.pem<\/em> files securely<\/li>\n\n\n\n<li>Monitor your SSL status using online tools or <a href=\"https:\/\/certpanel.com\/ssl-monitor\">CertPanel\u2019s SSL Monitor<\/a><\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/certpanel.com\/ssl-monitor\">Learn More ABout SSL Monitor<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Securing your CentOS 7 server with an SSL certificate ensures encrypted data transfer and builds trust with your users. In this step-by-step guide, we&#8217;ll cover two approaches to install an SSL certificate on CentOS 7 using Apache HTTP server (httpd): Requirements Before You Begin If you don\u2019t have an SSL certificate, you can get one<\/p>\n","protected":false},"author":15,"featured_media":2009,"parent":1965,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"wp-custom-template-expert-guides-detail","meta":{"_acf_changed":false,"_eb_attr":"","footnotes":""},"class_list":["post-2005","page","type-page","status-publish","has-post-thumbnail","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install an SSL Certificate on CentOS 7 (Apache)<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install an SSL Certificate on CentOS 7 (Apache)\" \/>\n<meta property=\"og:description\" content=\"Securing your CentOS 7 server with an SSL certificate ensures encrypted data transfer and builds trust with your users. In this step-by-step guide, we&#8217;ll cover two approaches to install an SSL certificate on CentOS 7 using Apache HTTP server (httpd): Requirements Before You Begin If you don\u2019t have an SSL certificate, you can get one\" \/>\n<meta property=\"og:url\" content=\"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/\" \/>\n<meta property=\"og:image\" content=\"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/install-ssl-centos-7-apache-feature.png\" \/>\n\t<meta property=\"og:image:width\" content=\"418\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/expert-guides\\\/ssl-tls-installation-and-automation\\\/how-to-install-an-ssl-certificate-on-centos-7-apache\\\/\",\"url\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/expert-guides\\\/ssl-tls-installation-and-automation\\\/how-to-install-an-ssl-certificate-on-centos-7-apache\\\/\",\"name\":\"How to Install an SSL Certificate on CentOS 7 (Apache)\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/expert-guides\\\/ssl-tls-installation-and-automation\\\/how-to-install-an-ssl-certificate-on-centos-7-apache\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/expert-guides\\\/ssl-tls-installation-and-automation\\\/how-to-install-an-ssl-certificate-on-centos-7-apache\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/wp-content\\\/uploads\\\/install-ssl-centos-7-apache-feature.png\",\"datePublished\":\"2025-08-06T18:00:53+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/expert-guides\\\/ssl-tls-installation-and-automation\\\/how-to-install-an-ssl-certificate-on-centos-7-apache\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/certpanel.com\\\/resources\\\/expert-guides\\\/ssl-tls-installation-and-automation\\\/how-to-install-an-ssl-certificate-on-centos-7-apache\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/expert-guides\\\/ssl-tls-installation-and-automation\\\/how-to-install-an-ssl-certificate-on-centos-7-apache\\\/#primaryimage\",\"url\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/wp-content\\\/uploads\\\/install-ssl-centos-7-apache-feature.png\",\"contentUrl\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/wp-content\\\/uploads\\\/install-ssl-centos-7-apache-feature.png\",\"width\":418,\"height\":200,\"caption\":\"Feature image for the article on how to install an SSL certificate on CentOS 7 Apache\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/expert-guides\\\/ssl-tls-installation-and-automation\\\/how-to-install-an-ssl-certificate-on-centos-7-apache\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Expert Guides\",\"item\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/expert-guides\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SSL\\\/TLS Installation and Automation\",\"item\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/expert-guides\\\/ssl-tls-installation-and-automation\\\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"How to Install an SSL Certificate on CentOS 7 (Apache)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/#website\",\"url\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/certpanel.com\\\/resources\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install an SSL Certificate on CentOS 7 (Apache)","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:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/","og_locale":"en_US","og_type":"article","og_title":"How to Install an SSL Certificate on CentOS 7 (Apache)","og_description":"Securing your CentOS 7 server with an SSL certificate ensures encrypted data transfer and builds trust with your users. In this step-by-step guide, we&#8217;ll cover two approaches to install an SSL certificate on CentOS 7 using Apache HTTP server (httpd): Requirements Before You Begin If you don\u2019t have an SSL certificate, you can get one","og_url":"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/","og_image":[{"width":418,"height":200,"url":"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/install-ssl-centos-7-apache-feature.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/","url":"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/","name":"How to Install an SSL Certificate on CentOS 7 (Apache)","isPartOf":{"@id":"https:\/\/certpanel.com\/resources\/#website"},"primaryImageOfPage":{"@id":"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/#primaryimage"},"image":{"@id":"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/#primaryimage"},"thumbnailUrl":"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/install-ssl-centos-7-apache-feature.png","datePublished":"2025-08-06T18:00:53+00:00","breadcrumb":{"@id":"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/#primaryimage","url":"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/install-ssl-centos-7-apache-feature.png","contentUrl":"https:\/\/certpanel.com\/resources\/wp-content\/uploads\/install-ssl-centos-7-apache-feature.png","width":418,"height":200,"caption":"Feature image for the article on how to install an SSL certificate on CentOS 7 Apache"},{"@type":"BreadcrumbList","@id":"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/how-to-install-an-ssl-certificate-on-centos-7-apache\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/certpanel.com\/resources\/"},{"@type":"ListItem","position":2,"name":"Expert Guides","item":"https:\/\/certpanel.com\/resources\/expert-guides\/"},{"@type":"ListItem","position":3,"name":"SSL\/TLS Installation and Automation","item":"https:\/\/certpanel.com\/resources\/expert-guides\/ssl-tls-installation-and-automation\/"},{"@type":"ListItem","position":4,"name":"How to Install an SSL Certificate on CentOS 7 (Apache)"}]},{"@type":"WebSite","@id":"https:\/\/certpanel.com\/resources\/#website","url":"https:\/\/certpanel.com\/resources\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/certpanel.com\/resources\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/certpanel.com\/resources\/wp-json\/wp\/v2\/pages\/2005","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/certpanel.com\/resources\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/certpanel.com\/resources\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/certpanel.com\/resources\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/certpanel.com\/resources\/wp-json\/wp\/v2\/comments?post=2005"}],"version-history":[{"count":0,"href":"https:\/\/certpanel.com\/resources\/wp-json\/wp\/v2\/pages\/2005\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/certpanel.com\/resources\/wp-json\/wp\/v2\/pages\/1965"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/certpanel.com\/resources\/wp-json\/wp\/v2\/media\/2009"}],"wp:attachment":[{"href":"https:\/\/certpanel.com\/resources\/wp-json\/wp\/v2\/media?parent=2005"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}