That should be possible with a vhost-extra custom template:
mkdir -p /etc/e-smith/templates-custom/httpd/vhost-extra/
Create /etc/e-smith/templates-custom/httpd/vhost-extra/15tracktrace
with following content.
#
# 15tracktrace - Track and trace rewrite rule
#
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
Any virtual host should include the rewrite rule after expanding the template. I didn’t test if this works for your track and trace case but this should give you an idea about templating your virtual hosts.
After expand-template /etc/httpd/conf.d/virtualhosts.conf
your virtualhost directives look like this:
<VirtualHost *:443>
DocumentRoot "/var/lib/nethserver/vhost/vhost1"
ServerName vhost1.domain.local
#
# 15tracktrace - Track and trace rewrite rule
#
RewriteEngine on
RewriteCond %REQUEST_METHOD ^(TRACE|TRACK)
RewriteRule .* - [F]
# 20forcessl_redirect disabled
# 30directory -- basic directory setup
<Directory /var/lib/nethserver/vhost/vhost1>
AllowOverride All
Options None
Options +Indexes
Options +Includes
<RequireAll>
# access private
Require ip 127.0.0.1 \
192.168.1.0/255.255.255.0
# authentication disabled
</RequireAll>
</Directory>
</VirtualHost>