I've got quite a big VirtualHost definition which I don't want to duplicate just so the site will also run over HTTPS.
Here's what I want to do:
<VirtualHost *>
ServerName example.com
<If port=443>
SSLEngine on
SSLCertificateFile ...
SSLCertificateKeyFile ...
SSLCertificateChainFile ...
</If>
(other config)
</VirtualHost>
Is there some way to do this?
Am I missing some other method of not duplicating the config?
SSLEngine Onin an<If>will giveSSLEngine not allowed here, so the suggested use-case at the start of this answer sadly doesn't appear to be possible. This seems to be because the requirement that "Only directives that support the directory context can be used within this configuration section." (ref) andSSLEngineisserver config, virtual host(ref), not directory. – fooquency Aug 28 '14 at 18:24