Apache with SSL (Secure Socket Shell)

Dependencies Installation

yum install openssl-devel -y

Uncomment the httpd-ssl.conf Include line in the /usr/local/apache/conf/httpd.conf file.

vim /usr/local/apache/conf/httpd.conf

Include conf/extra/httpd-ssl.conf

Changing directory to /usr/local/apache/conf/extra

cd /usr/local/apache/conf/extra

egrep ‘server.crt|server.key’ httpd-ssl.conf

Changing to root directory

cd ~

Creating .srt file

openssl genrsa -des3 -out server.key 1024

openssl req -new -key server.key -out server.csr

#openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

Copying server.crt and server.key files to /usr/local/apache/conf

cp server.crt /usr/local/apache/conf/

cp server.key /usr/local/apache/conf/

Apache server starting

/usr/local/apache/bin/apachectl start

Checking ssl using https

elinks https://<ip>

Leave a Reply

Your email address will not be published. Required fields are marked *