June 2015
Intermediate to advanced
216 pages
4h 48m
English
If we create a template file for a virtual host, we can easily drop new virtual hosts using a script. First, we need a template file that is similar to the following commands:
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.example.com
ServerName dummy-host.example.com
DocumentRoot /var/www/dummy-host.example.com
ErrorLog /var/log/httpd/dummy-host.example.com-error_log
CustomLog /var/log/httpd/dummy-host.example.com-access_log
UseCanonicalName Off
ServerSignature On
<Directory "/var/www/vhosts/dummy-host.example.com">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
</VirtualHost>If this file is saved as /etc/httpd/conf.d/template, it will not be used as a configuration as it does not ...