How to enable SSL on Apache Fedora 26

Fedora Tutorial – Hello Linux users, today we will learn how to secure our web server by enable SSL on Apache Fedora 26. On my previous tutorial, we have learned how to install and configure LAMP Server on Fedora 26. If you follow that guide, it would be easier for you to continue to secure your web server with this tutorial. There are several steps to enable SSL on web server Fedora 26.

Steps to enable SSL on Apache Fedora 26

Step 1. Create Certificate

First, we need to create a new SSL certificate. Log in to the server and execute these commands below.

Output example

Now we need to remove pass phrase from the private key

Create server.csr

Output Example

Followed by the last command

Output

Now we have completed to create SSL certificate.

Step 2. Configure HTTPD for SSL

Install mod_ssl

Output

Edit /etc/httpd/conf.d/ssl.conf

Now find and uncomment line 59 and 60 and change them to the following. Off course you need to modify the server name with your own.

On Line 76 and 77, change them to:

On line 98 change to the following

Also on line 105 change it to the following

Close and save the file. Finally restart httpd

Now try accessing the web server using https

https://ip-server

enable SSL on Apache Fedora 26

You will see such error above. It is normal since we use self signed certificate on the system. Thank you for reading this post on How to enable SSL on Apache Fedora 26. See you on the next tutorial.

Be the first to comment

Leave a Reply

Your email address will not be published.


*