Serverlinux.in

Serverlinux.in

Share

Linux System Administrator Tutorials The main form of distribution are Linux distributions.

Home 21/05/2015

Configure SSL on Centos & Redhat Step by step
Required Packages:

install mod_ssl openssl

Self-signed Certificate Generate:

# Generate private key
openssl genrsa -out ca.key 2048

# Generate CSR
openssl req -new -key ca.key -out ca.csr

# Generate Self Signed Key
openssl x509 -req -days 365 -in ca.csr -signkey ca.key -out ca.crt

# Copy the files to the correct locations
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

Allow on the selinux:

restorecon -RvF /etc/pki

Configuration SSL on configuration file.

vi +/SSLCertificateFile /etc/httpd/conf.d/ssl.conf

Find and change these certificate file:
SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/iocl_virtuosos_in.crt
SSLCertificateKeyFile /etc/pki/tls/certs/private.key

SSLCertificateKeyFile /etc/pki/tls/private/ca.key

httpd restart

Configure the virtual host for normal web page :

NameVirtualHost *:80


DocumentRoot /var/www/html/vivek.serverlinux.in
ServerName vivek.serverlinux.in
ErrorLog /var/log/httpd/vivek/error_log
CustomLog /var/log/httpd/vivek/access_log common
ServerAlias www.vivek.serverlinux.in
Alias /vivek “/var/www/html/vivek.serverlinux.in”

DirectoryIndex index.php

Configure the virtual host for SSL web page :

NameVirtualHost *:443


SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
AllowOverride All

DocumentRoot /var/www/html/vivek.serverlinux.in
ServerName vivek.serverlinux.in

httpd restart

Home

Want your business to be the top-listed Computer & Electronics Service in Delhi?
Click here to claim your Sponsored Listing.

Telephone

Address


Delhi
110096