systemctl restart apache
#CentOS 7, Ubuntu 16.04 and Debian 8 systemctl restart httpd #or systemctl restart apache #CentOS 6, Debian 7, Ubuntu 15.10 service httpd restart #or service apache restart
Here is what the above code is Doing:
1. We’re creating a new file called /etc/httpd/conf.d/ssl.conf.
2. We’re adding the following lines to the file:
LoadModule ssl_module modules/mod_ssl.so
Listen 443
DocumentRoot “/var/www/html”
SSLEngine on
SSLCertificateFile “/etc/pki/tls/certs/localhost.crt”
SSLCertificateKeyFile “/etc/pki/tls/private/localhost.key”
3. We’re restarting the Apache service.