Is there a method for declaring name based virtual hosts, but sharing the same directory declarations? So for example, the Directory section in both of these Vhosts is the same, so is there a method to only declare it once, and have it used by both Vhosts? Same for the Error log section. Is there a method for declaring the error log only once? (Possibly inside the Directory?)
<VirtualHost *:80>
ServerName email.123456.com
DocumentRoot /var/www/mail
<Directory /var/www/mail>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/mail/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/mail/access.log combined
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName email.123456.com
DocumentRoot /var/www/mail
<Directory /var/www/mail>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Order Allow,Deny
Allow from All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/mail/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/mail/access.log combined
SSLEngine on
SSLCertificateFile /var/certs/123456/123456.com.crt
SSLCertificateKeyFile /var/certs/123456/123456.key
SSLCertificateChainFile /var/certs/123456/sf_bundle.crt
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
BrowserMatch MSIE [17-9] ssl-unclean-shutdown
</VirtualHost>
</IfModule>