Enable SSL for Apache Monitoring

Enabling SSL for Apache Monitoring

  1. Enable SSL support on Apache default virtual host file, found in the following location:
    For Ubuntu/Debian: sudo vi /etc/apache2/sites-enable/000-default.conf
    For Centos/Redhat: sudo vi /etc/httpd/conf.d/ssl.conf
  2. Edit the virtual host file to support SSL in port 443:
    For Ubuntu/Debian:
    <VirtualHost *:443>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    SSLEngine on
    SSLCertificateFile <File Name>
    SSLCertificateKeyFile <Key>
    </VirtualHost>


    For Centos/Redhat:
    <VirtualHost _default_:443>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    # SSLProtocol all -SSLv2
    # SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5:!SEED:!IDEA
    SSLCertificateFile <File Name>
    SSLCertificateKeyFile <Key>
    </VirtualHost>
  3. Run the below commands to enable SSL mode:
    For Ubuntu/Debian: sudo a2enmod ssl
    For Centos/Redhat: sudo yum install mod_ssl
  4. Restart the server.