Install SSL Linux Server Apache2
sudo a2enmod ssl
sudo service apache2 restart
sudo apt-get update
sudo apt-get install python3-certbot-apache
sudo certbot –apache -d Domain_name -d www.Domian_name
Second Option
- Generate SSL Key for your Domain (https://www.sslforfree.com/)
- sudo apt-get update
- sudo apt-get install apache2
- sudo a2enmod ssl
- sudo service apache2 restart
- sudo mkdir /etc/apache2/ssl
- sudo nano /etc/apache2/sites-available/default-ssl.conf
Add this
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
# ServerAdmin webmaster@localhost
ServerAdmin [email protected]
ServerName your_domain.com
ServerAlias www.your_domain.com
DocumentRoot /var/www/html
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/certificate.crt
SSLCertificateKeyFile /etc/apache2/ssl/private.key
<FilesMatch “\.(cgi|shtml|phtml|php)$”>
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch “MSIE [2-6]” \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
BrowserMatch “MSIE [17-9]” ssl-unclean-shutdown
</VirtualHost>
</IfModule>
- sudo a2ensite default-ssl.conf
- sudo service apache2 restart