How To install SSL Certificate on Apache for CentOS 7

yum -y install httpd mod_ssl
sudo systemctl enable httpd.service
systemctl start httpd.service
mkdir -p /etc/ssl/private
chmod 700 /etc/ssl/private
sudo vi /etc/httpd/conf.d/ssl.conf<VirtualHost *:443>
DocumentRoot /var/www/html
ServerName www.example.com
SSLEngine on
SSLCertificateFile /etc/ssl/private/certificate.crt
SSLCertificateKeyFile /etc/ssl/private/private.key

</VirtualHost>
sudo vi /etc/httpd/conf/httpd.conf<VirtualHost *:80>
ServerName www.example.com
Redirect "/" "https://www.example.com/"
</VirtualHost>
apachectl configtest
systemctl restart httpd

SSL Installation Checker

  • 0 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

SSL information

Do you need assistance on how to generate your CSR, how to install your SSL cert or where you can...

How to Install an SSL/TLS Certificate In Web Host Manager (WHM)

How to Install an SSL/TLS Certificate In Web Host Manager (WHM) The following instructions...