From the course: Red Hat Enterprise Linux 8 Essential Training

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Configure a secure virtual host

Configure a secure virtual host

From the course: Red Hat Enterprise Linux 8 Essential Training

Start my 1-month free trial

Configure a secure virtual host

- [Instructor] In this exercise, we'll create a secure virtual host using the key and certificate that we created in the previous video. You will want to be logged into rhhost1 and have a terminal open. Let's start by creating the new document root. Type in sudo mkdir /var/www/html/secure and hit Enter. Now we need to edit the ssl.conf file. This file contains a virtual host container that we will modify. Type in sudo vi /etc/httpd/conf.d/ssl.conf and hit Enter. Search for VirtualHost by pressing slash and then typing in VirtualHost. Go into insert mode by pressing I, and then change the DocumentRoot to /var/www/html/secure. And change the ServerName to secure.localnet.com:443. Now press Escape and slash, and search for SSLCertificateFile. And change the filename from localhost.crt to secure.localnet.com.crt. Now scroll down a bit to the CertificateKeyFile line. Change the filename from localhost.key to secure.localnet.com.key. And now save and exit by pressing Escape + :x! and…

Contents