Run Command:-
lsb_release -a
Output:-
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.5 LTS Release: 18.04 Codename: bionic
Move SSL Certificate to server
Go to your html folder & make a folder to hold the ssl files
cd /var/www/html sudo mkdir ssl_files
Now SSH again to your server and move the certificate files to required place.
cd /var/www/html/ssl_files sudo cp your_site.crt /etc/apache2/ssl/your_site.crt sudo cp your_site.key /etc/apache2/ssl/your_site.key sudo cp your_site.ca-bundle /etc/apache2/ssl/your_site.ca-bundle
ADDING SSL VIRTUALHOST ENTRIES
<VirtualHost *:443>
ServerName your_site.com
ServerAlias www.your_site.com
DocumentRoot /documentroot/
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/your_site.crt
SSLCertificateKeyFile /etc/apache2/ssl/private/your_site.key
SSLCertificateChainFile /etc/apache2/ssl/your_site.ca-bundle
</VirtualHost>
Restart Apache
sudo systemctl restart apache2
ENABLE APACHE 2 SSL MODULE IF NOT ENABLED ALREADY
sudo a2enmod ssl
sudo systemctl restart apache2
No comments:
Post a Comment