1. #install ssl realted program
yum install mod_ssl openssl
2. # generate private key
openssl genrsa -out ca.key 1024
3. # generae CSR from private key
openssl req -new -key ca.key -out ca.csr
4. # generate self assign certificate
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt
5. # Copy file to appropiate location
cp ca.crt /etc/pki/tls/certs
cp ca.key /etc/pki/tls/private/ca.key
cp ca.csr /etc/pki/tls/private/ca.csr
6. #Edit Apache SSL configuration file
vi +/SSLCertificateFile /etc/httpd/conf.d/ssl.conf
7.#Edit following lines SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
8. #Restart Apache server
service httpd restart
9. #create directory for SSL virtual host
cd /var/www
mkdir html
cd /var
mkdir www-ssl
cd www-ssl
mkdir html
10. # To configure HTTPS over port 443
vi /etc/httpd/conf.d/ssl.conf
11. # Example HTTPS configuration
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
AllowOverride All
DocumentRoot /var/www-ssl/html
ServerName FQDN of web server
12. #Restart Apache server
service httpd restart
13. #Put html file to /var/www-ssl/html