From the course: Linux System Engineer: Web Servers and DNS Using Apache, NGINX, and BIND

Unlock the full course today

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

Configure a secure virtual host

Configure a secure virtual host - Red Hat Enterprise Linux Tutorial

From the course: Linux System Engineer: Web Servers and DNS Using Apache, NGINX, and BIND

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 space mkdir space /var/www/html/secure and hit Enter. Now we need to edit the ssl.conf file. This file contains the virtual host container that we will modify. Type in sudo space vi space /etc/httpd/conf.d/ssl.conf and hit Enter. Search for virtualhost by pressing slash, and then typing in virtualhost. Change the document root to /var/www/html/secure. Go into insert mode by pressing I, and then change the document root to /var/www/html/secure. And change the server name to secure.localnet.com:443. Now press Escape and slash, and search for SSLCertificateFile and change the file name from localhost.crt to secure.localnet.com.crt. Now scroll down a bit to the certificate key file line. Change the file name from localhost.key to…

Contents