Bobcares

Activate SSL Apache2

by | Jan 1, 2023

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.

  1. 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
  2. Then, verify or update Apache’s SSL configuration file and save.
    1. 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.
    2. Verify that the following line is uncommented: Include conf/extra/[httpd-]ssl.conf Note: On CentOS 7, the file is called ssl.conf rather than httpd-ssl.conf.
    3. Add the following section to your configuration file (httpd.conf):For Debian, Fedora, SUSE, and Ubuntu Linux distributions: <IfModule ssl_module> Listen 443 </IfModule> For CentOS and RedHat Linux distributions: <IfDefine SSL> Listen 443 </IfDefine>
    4. 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 ...
    5. Save your changes and close the file.
  3. Restart the Apache Web Server.Linux OSRestart Command
    • Debian 8 or newer Ubuntu 15.04 or newer

    $ systemctl restart apache2.service

    • CentOS 7 or newerRHEL 7 or newer

    $ systemctl restart httpd.service

    • Debian 7 or olderUbuntu 14.10 or older

    $ sudo service apache2 restart

    • CentOS 6RHEL 6

    $ sudo service httpd restart

  4. 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

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.