Creating the virtual host template

As we are not going to test the virtual hosts we create, we will make a copy of the httpd.conf file and work with that locally in our home directory. This is good practice while developing the scripts so as not to impact the working configuration. The httpd.conf file that I am working with should be able to be downloaded with other script resources referred to in the script from the publisher. Alternatively, you can copy it from your CentOS host with Apache installed. Make sure that the httpd.conf file is copied to your home directory and that you are working in your home directory.

Get Mastering Linux Shell Scripting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.