How to install SSL certificate in Linux

Enable SSL in Apache

				
					$ sudo a2enmod ssl
				
			

Update config file

Step 1: Navigate to /etc/apache2/sites-enabled/

Step 2: Edit the file “000-default.conf”

Step 3: Comment out all existing lines inside with a ‘#’

Replace the filepaths shown above with the appropriate path that is used for your linux server.

Step 4: Add the below to the file.

				
					<VirtualHost *:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combine
SSLEngine on
SSLCertificateFile /etc/ssl/certificate.crt
SSLCertificateKeyFile /etc/ssl/certificate.key
SSLCertificateChainFile /etc/ssl/chain.crt
</VirtualHost>
				
			

Step 5: Replace the filepaths shown above with the appropriate path that is used for your linux server.

Restart the apache2 service

				
					$ systemctl restart apache2
				
			

Note: The config file mentioned above may differ in different Linux servers.

×

Hello!

Click one of our representatives below to chat on WhatsApp or send an email to sales@jetworkflow.com

× How can I help you?