Enable SSL for Apache2 on Raspberry Pi

  1. mkdir /etc/apache2/ssl
  2. openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -out /etc/apache2/ssl/server.crt -keyout /etc/apache2/ssl/server.key
    a2enmod ssl
  3. ln -s /etc/apache2/sites-available/default-ssl /etc/apache2/sites-enabled/000-default-ssl
  4. edit /etc/apache2/sites-enabled/000-default-ssl

    SSLCertificateFile /etc/apache2/ssl/server.crt
    SSLCertificateKeyFile /etc/apache2/ssl/server.key

  5. /etc/init.d/apache2 restart


Leave a Reply

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