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 directiv…


This content originally appeared on DEV Community and was authored by simc dev

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.com
DocumentRoot YOURDOCUMENTROOT
SSLEngine on
SSLCertificateFile Path to certificate file
SSLCertificateKeyFile 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.

install SSL on nginx


This content originally appeared on DEV Community and was authored by simc dev


Print Share Comment Cite Upload Translate Updates
APA

simc dev | Sciencx (2022-07-15T11:49:05+00:00) How to install SSL on apache. Retrieved from https://www.scien.cx/2022/07/15/how-to-install-ssl-on-apache/

MLA
" » How to install SSL on apache." simc dev | Sciencx - Friday July 15, 2022, https://www.scien.cx/2022/07/15/how-to-install-ssl-on-apache/
HARVARD
simc dev | Sciencx Friday July 15, 2022 » How to install SSL on apache., viewed ,<https://www.scien.cx/2022/07/15/how-to-install-ssl-on-apache/>
VANCOUVER
simc dev | Sciencx - » How to install SSL on apache. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/07/15/how-to-install-ssl-on-apache/
CHICAGO
" » How to install SSL on apache." simc dev | Sciencx - Accessed . https://www.scien.cx/2022/07/15/how-to-install-ssl-on-apache/
IEEE
" » How to install SSL on apache." simc dev | Sciencx [Online]. Available: https://www.scien.cx/2022/07/15/how-to-install-ssl-on-apache/. [Accessed: ]
rf:citation
» How to install SSL on apache | simc dev | Sciencx | https://www.scien.cx/2022/07/15/how-to-install-ssl-on-apache/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.