To Generate a Certificate Signing Request for Apache 2.x
- Log in to your server’s terminal (SSH).
- At the prompt, type the following command:
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr
Replace yourdomain with the domain name you’re securing. For example, if your domain name is coolexample.com, you would type coolexample.key and coolexample.csr.
- Enter the requested information:
If you do not want to enter a password for this SSL, you can leave the Passphrase field blank. However, please understand there might be additional risks.
- Open the CSR in a text editor (nano;pico;vi) and copy all of the text.
Apache SSL Installation Instructions
1. Save the primary and intermediate certificates to /etc/ssl/certs/ on the server with the private key.- Open the Apache configuration file in a text editor.
3. If you need your site to be accessible through both secure (https) and non-secure (http) connections, you will need a virtual host for each type of connection. Make a copy of the existing non-secure virtual host and change the port from port 80 to 443.
- Add the lines in below:
- Change the names of the files and paths to match your certificate files:
- Save the changes and exit the text editor (nano;pico;vi).
- Restart your Apache web server using one of the following commands:
CENTOS:
UBUNTO:


