An Interest In:
Web News this Week
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
- March 14, 2024
- March 13, 2024
July 15, 2022 11:49 am GMT
Original Link: https://dev.to/devsimc/how-to-install-ssl-on-apache-44af
How to install SSL on apache
Steps to install SSL on apache
Navigate to Apache configuration files
/etc/httpd/conf
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.comDocumentRoot YOURDOCUMENTROOTSSLEngine onSSLCertificateFile Path to certificate fileSSLCertificateKeyFile Path to key file</VirtualHost>
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
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
Fire below command
yum install mod24_ssl
After this command again restart your apache server.
That's all :).
Now your domain will work with HTTPS.
Original Link: https://dev.to/devsimc/how-to-install-ssl-on-apache-44af
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To