Manually Install an SSL Certificate on CentOS Stream 9

Pre-requisites:

A system with CentOS Stream 9 installed and running
Access to a terminal or command line
Root or sudo privileges
GoDaddy Domain Validation SSL Certificate

Connect to your remote system using SSH

In the terminal, type the following command

openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr

Replace yourdomain with the domain name you're securing

Enter the requested information

Open the CSR in a text editor and copy all of the text

Paste the full CSR into the SSL enrollment form in your account

Next, prove domain control. Multiple options are provided. I chose adding a TXT record to the DNS

Go to your GoDaddy product page and select ssl certificates and manage. Next, select server type and download zip file under download certificate

On CentOS, the SSL directory should be

To store your certificate

to /etc/pki/tls/certs directory

Save your private keys

to /etc/pki/tls/private directory

Next, find the apache virtual hosts conf file for your domain

Port 443 is the default http port. Here is an example configuration:

<VirtualHost *:443>
    ServerName mydomain.com
    ServerAlias www.mydomain.com
    DocumentRoot /var/www/domain
        SSLEngine On
        SSLCertificateFile /path/to/ssl/cert.crt
        SSLCertificateKeyFile /path/to/ssl/key.key
</VirtualHost>

Run the following command to check your Apache configuration file for errors:

apachectl configtest

You will need to ensure that the Apache mod_ssl module is installed on your system for enabling http encryption

dnf install mod_ssl

You can verify the SSL certificate on your web server to make sure it is correctly installed

http://www.sslshopper.com/ssl-checker.html
http://www.whynopadlock.com

GoDaddy offers a variety of plans for your needs. Compare GoDaddy SSL plans and pricing

GoDaddy SSL Certificate

If the HTML code of your page has "http://" links, you may find not secure or mixed content warnings. To fix this you need to replace with "http://" or a relative URL

If there is no padlock, these are the things you can do to fix the problem

Check your http redirect settings
Rekey your certificate
Reinstall your certificate

Learn

Related articles

Getting Started with React

In this guide, we will cover the basics of setting up a local development environment, starting a simple React project, and the basics of how it works.

How to Create Bash Aliases

This tutorial demonstrates how to use the alias command to create personalized shortcuts, which can help you save time and feel less frustrated.

Using Git for PHP Development

This guide walks through the fundamentals of Git. In this tutorial, we will show you Git commands. For Linux you can use the built-in terminal.

How to Connect to MySQL with Laravel

In this guide, you will learn how to connect your Laravel application to your MySQL database.

How do you change the default SSH Port on CentOS Stream 9?

Changing the default SSH port adds an extra layer of security by reducing the risk of your password being cracked from a brute force attack.

What is Inheritance in PHP?

In this tutorial we will explain inheritance in PHP, a mechanism that allows a child class to inherit properties and behaviors from a parent class.