<VirtualHost _default_>
AllowEncodedSlashes On
<IfModule rewrite_module>
RewriteEngine On
RewriteOptions Inherit
</IfModule>
# Make it even more generic with "variables":
ServerAlias www.%{ServerName}
<Directory %{DocumentRoot}>
php_admin_value open_basedir %{DocumentRoot}
</Directory>
<Directory %{DocumentRoot}/*>
AllowOverride None
</Directory>
</VirtualHost>
#
# Common configuration-set for specific port 443:
<VirtualHost _default_:443>
SSLEngine on
SSLCertificateFile "server.crt"
SSLCertificateKeyFile "server.key"
</VirtualHost>
#
#
# And here comes real servers (with ServerName and DocumentRoot) where the configuration-set will apply to them
#
<VirtualHost _default_>
DocumentRoot /domain
# In case if want to differ the common configuration-set configuration:
<Directory /domain>
php_admin_value open_basedir /domain/assets
</Directory>
</VirtualHost>
<VirtualHost _default_>
DocumentRoot /domain2
</VirtualHost>
If there are no incompatibility for that, then I propose to add it!
The problem: without this compatibility the VirtualHost's configuration file is very long while having many VirtualHost's and the same or similar configuration for all VirtualHost's.
Binyamin