Our conf file looks like this:
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
ServerName http://www.example.com
ServerAlias example.com http://www.example.com secure.example.com
DocumentRoot /var/www/example.com
ServerAdmin admin@example.com
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/example.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/example_error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel error
CustomLog /var/log/apache2/example_access.log combined
ServerSignature On
</VirtualHost>
<VirtualHost *:443>
ServerName secure.example.com
ServerAlias secure.example.com
DocumentRoot /var/www/example.com
ServerAdmin admin@example.com
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/example.com>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/secure-example_error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel error
CustomLog /var/log/apache2/secure-example_access.log combined
ServerSignature On
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/secure.example.com.crt
SSLCertificateKeyFile /etc/apache2/ssl/secure.example.com.key
SSLCertificateChainFile /etc/apache2/ssl/gd_bundle.crt
</VirtualHost>
If anyone spots any problems, please let me know.