Wondering how to Activate SSL Apache2 ? Our in-house experts are here to help you out with this article. Our server management services is here to offer a lending hand with your queries and issues.
Activate SSL Apache2
Today, let us see the steps followed by support techs to activate it.
- Firstly, locate your Apache configuration file and open with a text editor.The name of your Apache configuration file depends on your system platform. Typically, your Apache configuration file is named httpd.conf or apache2.conf.
- Version and Path :
- RedHat, CentOS, Fedora /etc/httpd/conf/httpd.conf
- Ubuntu, Debian /etc/apache2/apache2.conf
- SLES /etc/apache2/httpd.conf
- Then, verify or update Apache’s SSL configuration file and save.
- Open your Apache SSL configuration file, httpd-ssl.conf (or ssl.conf). If you cannot locate the configuration file, see the Apache documentation for your operating system.
- Verify that the following line is uncommented:
Note: On CentOS 7, the file is called ssl.conf rather than httpd-ssl.conf.Include conf/extra/[httpd-]ssl.conf
Copy Code - Add the following section to your configuration file (httpd.conf):For Debian, Fedora, SUSE, and Ubuntu Linux distributions:
For CentOS and RedHat Linux distributions:<IfModule ssl_module> Listen 443 </IfModule>
Copy Code<IfDefine SSL> Listen 443 </IfDefine>
Copy Code - Update the SSLCertificateFile and SSLCertificateKeyFile values to the correct certificate paths and file names.For example:
... SSLCertificateFile /path/to/my_cert_name.crt SSLCertificateKeyFile /path/to/my_key_name.key ...
Copy Code - Save your changes and close the file.
- Restart the Apache Web Server.Linux OSRestart Command
- Debian 8 or newer Ubuntu 15.04 or newer
$ systemctl restart apache2.service
Copy Code- CentOS 7 or newerRHEL 7 or newer
$ systemctl restart httpd.service
Copy Code- Debian 7 or olderUbuntu 14.10 or older
$ sudo service apache2 restart
Copy Code- CentOS 6RHEL 6
$ sudo service httpd restart
Copy Code - Finally, test your SSL connection. Go to https://your-server-ip-or-name to test your SSL setup.
This must the same hostname that you entered into the common name field when creating your certificate.
Conclusion
In conclusion, our Support Engineers showed us steps to Activate SSL Apache2. Drop us a line in the comments if you face any trouble.
0 Comments