Apache setup for https


  1. # sudo apt-get install apache2 openssl
  2. # a2enmod ssl
  3. # a2enmod rewrite
  4. # mkdir /etc/apache2/certificate
  5. # cd /etc/apache2/certificate
  6. # openssl req -new -newkey rsa:4096 -x509 -sha256 -days 365 -nodes -out apache-certificate.crt -keyout apache.key
  7. /etc/apache2/sites-enabled/000-default.conf
  8. service apache2 restart
Optional: (and skipped)
  1. # vi /etc/apache2/apache2.conf
  2. add the followings at the end of the file:
  3.       <Directory /var/www/html>
    	AllowOverride All
          </Directory>
      

Go back to Computer

20230924