DEV Community

Cover image for How to install SSL on apache
Simc Dev
Simc Dev

Posted on • Originally published at cmsinstallation.blogspot.com

4 3

How to install SSL on apache

Steps to install SSL on apache

Navigate to Apache configuration files

/etc/httpd/conf
Enter fullscreen mode Exit fullscreen mode

Here you will get httpd.conf file. First of all, you have to set the file permission to edit the file. After that, you have to create a new virtual directive into it. open your httpd.conf file and update the below code at the end of the file.

example how to install SSL on apache.

<VirtualHost *:443>
ServerName www.yourdomain.com
DocumentRoot YOURDOCUMENTROOT
SSLEngine on
SSLCertificateFile Path to certificate file
SSLCertificateKeyFile Path to key file
</VirtualHost>
Enter fullscreen mode Exit fullscreen mode

In the Above code replace your domain name and certificate file paths.Save the above file and restart the apache by command.

Sudo service httpd restart
Enter fullscreen mode Exit fullscreen mode

After restarting the server you may face below listed error

Starting httpd: AH00526: Syntax error on line 356 of /etc/httpd/conf/httpd.conf:
Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration
Enter fullscreen mode Exit fullscreen mode

Fire below command

yum install mod24_ssl 
Enter fullscreen mode Exit fullscreen mode

After this command again restart your apache server.
That's all :).

Now your domain will work with HTTPS.

install SSL on nginx

Sentry blog image

How to reduce TTFB

In the past few years in the web dev world, we’ve seen a significant push towards rendering our websites on the server. Doing so is better for SEO and performs better on low-powered devices, but one thing we had to sacrifice is TTFB.

In this article, we’ll see how we can identify what makes our TTFB high so we can fix it.

Read more

Top comments (0)

Cloudinary image

Optimize, customize, deliver, manage and analyze your images.

Remove background in all your web images at the same time, use outpainting to expand images with matching content, remove objects via open-set object detection and fill, recolor, crop, resize... Discover these and hundreds more ways to manage your web images and videos on a scale.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay