How to install a Certificate SSL DVW on Apache Web Server
1)Purchase your Certificate SSL DVW (Domain Validated Wildcard ) from your provider.
2)Log in to your server’s terminal via Secure Shell (SSH).
3)Generate a private key and CSR by running the following command:
1 |
openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr |
Note: Replace “server” with the domain name you intend to secure.
Enter the following CSR details when prompted:
- Common Name: The FQDN (fully-qualified domain name) you want to secure with the certificate such as www.google.com, secure.website.org, *.domain.net, etc.
- Organization: The full legal name of your organization including the corporate identifier.
- Organization Unit (OU): Your department such as ‘Information Technology’ or ‘Website Security.’
- City or Locality: The locality or city where your organization is legally incorporated. Do not abbreviate.
- State or Province: The state or province where your organization is legally incorporated. Do not abbreviate.
- Country: The official two-letter country code (i.e. US, CH) where your organization is legally incorporated.
Note: You are not required to enter a password or passphrase. This optional field is for applying additional security to your key pair.
4)Copy all CSR text including:
1 2 3 |
-----BEGIN CERTIFICATE REQUEST----- And -----END CERTIFICATE REQUEST----- |
5)Return to the Generation Form on our website and paste the entire CSR into the blank text box and continue with completing the generation process. Your order will enter the validation process with the issuing Certificate Authority (CA) and require the certificate requester to complete some form of validation depending on the certificate purchased.
6)Copy SSL Certificate (PEM) in new file of your server.(es. your_domain_name.crt)
7)Copy CA-bundle in new file of your server. (es. cabundle.crt)
8)Locate the apache config file to edit:
1 |
/etc/apache2/sites-available |
Configure the httpdomain.conf file and enter the following commands on your VirtualHost to successfully enable SSL:
1 2 3 4 5 6 7 8 |
<VirtualHost 192.168.0.1:443> DocumentRoot /var/www/html2 ServerName www.yourdomain.com SSLEngine on SSLCertificateFile /path/to/your_domain_name.crt SSLCertificateKeyFile /path/to/your_private.key SSLCertificateChainFile /path/to/cabundle.crt </VirtualHost> |
9)Enable your configuration:
1 |
a2ensite httpdomain.conf |
10)Reload Apache:
1 |
systemctl reload apache2 |
11)Congratulations! You’ve successfully installed your SSL certificate! Remember, you may need to restart your server for changes to take effect.