tente mod_macro
Aqui está um exemplo:
## Define a VHost Macro for repetitive configurations
<Macro VHost $host $port $dir>
Listen $port
<VirtualHost *:$port>
ServerName $host
DocumentRoot $dir
# Public document root
<Directory $dir>
Require all granted
</Directory>
# limit access to intranet subdir.
<Directory $dir/intranet>
Require ip 10.0.0.0/8
</Directory>
</VirtualHost>
</Macro>
## Use of VHost with different arguments.
Use VHost www.apache.org 80 /vhosts/apache/htdocs
Use VHost example.org 8080 /vhosts/example/htdocs
Use VHost www.example.fr 1234 /vhosts/example.fr/htdocs