Administration Guide : Configuring Apache Web server : Configure Apache Web Server with SSL/HTTPS (for Linux)

Configure Apache Web Server with SSL/HTTPS (for Linux)
Before you can configure Xinet on an Apache Web server on Linux, you must enable SSL/HTTPS on Linux.
Apache allows the enabling of SSL simultaneously (with HTTP) by simply installing the mod_ssl module:
yum install mod_ssl
If you want to run HTTP exclusively and provide your own certifications, follow these steps (for a Redhat Linux 7.2 server):
1.
yum install mod_ssl
2.
openssl genrsa -out mydomain.key 1024
3.
openssl req -new -key mydomain.key -x509 -out mydomain.crt
4.
/etc/httpd/conf/ssl.key/mydomain.key
/etc/httpd/conf/ssl.crt/mydomain.crt
5.
Edit the ssl.conf file. It should be located in /etc/httpd/conf.d/ssl.conf
6.
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
DocumentRoot "/var/www/html"
7.
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/mydomain.key
8.
SSLCertificateFile /etc/httpd/conf/ssl.crt/mydomain.crt
9.
10.
Edit the httpd.conf file
11.
<Directory "/var/www/htm"l>
12.
SSLRequireSSL
SSLOptions +StrictRequire
13.
apachectl restart