Install a 1&1 SSL Certificate on Ubuntu 16.04
Table of Contents
- Download the SSL Certificate File
- Install the SSL Certificate
- Configure Apache
After you set up a 1&1 SSL certificate, you will need to install the certificate in order to encrypt the traffic on your server. Learn how to install an SSL certificate on a 1&1 Cloud Server with Ubuntu 16.04 Linux.
Note: For any 1&1 Cloud Server with Plesk, SSL certificates should always be added and managed through the Plesk interface. See our article Install a 1&1 SSL Certificate on a Cloud Server with Plesk for step-by-step instructions.
- A 1&1 Cloud Server with Linux (Ubuntu 16.04)
- An SSL certificate
- The SSL certificate private
For step-by-step instructions on obtaining an SSL certificate, see the article Set Up a 1&1 SSL Certificate.
The SSL certificate private key is created when the SSL certificate is set up. During the creation process, you are instructed to save this private key file to a safe location on your computer.
Download the SSL Certificate File
Log in to the Control Panel and click My Products > SSL Certificates.
Click the domain you used to set up the SSL certificate.
Download the SSL certificate.
This will save the certificate file to your computer.
Install the SSL Certificate
Upload the private key (
.key) and certificate (
.cer) files to your home directory on the server. For step-by-step instructions on how to use SCP to securely upload files to a 1&1 Cloud Server with Linux, see our tutorial Upload a Website to a 1&1 Cloud Server with Linux.
Connect to the server with SSH and go to your home directory:
Move the certificate file to the
sudo mv *.cer /etc/ssl/certs/
Move the key file to the
sudo mv *.key /etc/ssl/private/
Open the default SSL virtual host file for editing:
sudo nano /etc/apache2/sites-available/default-ssl.conf
ServerAdmin to your valid email address:
Below this line, add the
ServerName with either the domain name or IP address:
ServerAdmin webmaster@localhost ServerName example.com
Find the lines which read:
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
Change these to the location and name of your SSL certificate and key file:
SSLCertificateFile /etc/ssl/certs/example.com_ssl_certificate.cer SSLCertificateKeyFile /etc/ssl/private/example.com_private_key.key
Save and exit the file.
Enable SSL on the server:
sudo a2enmod ssl
Enable the SSL virtual host:
sudo a2ensite default-ssl
Restart Apache for the changes to take effect:
sudo systemctl restart apache2
You will now be able to visit the SSL-secured version of your site with a URL like
Tags: SSL Certificates