Fixes to work better on chankillo
[sysconfig/apache2.git] / sites-available / 000-default-ssl.conf
index 56446b7edfc265ac02a47f7740aa1ea308d722ac..1dadd35824a9613425481ef7640263760e5a08b8 100644 (file)
        #   /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
        #   If both key and certificate are stored in the same file, only the
        #   SSLCertificateFile directive is needed.
-       SSLCertificateFile /etc/ssl/local-certs/dehnerts-web.chain.crt
-       SSLCertificateChainFile /etc/ssl/local-certs/dehnerts-web.chain.crt
-       #SSLCertificateFile    /etc/ssl/certs/general-web.crt
-       SSLCertificateKeyFile /etc/ssl/private/general-web.key
+       <IfFile "/etc/ssl/local-certs/dehnerts-web.chain.crt">
+               SSLCertificateFile /etc/ssl/local-certs/dehnerts-web.chain.crt
+               SSLCertificateChainFile /etc/ssl/local-certs/dehnerts-web.chain.crt
+               #SSLCertificateFile    /etc/ssl/certs/general-web.crt
+               SSLCertificateKeyFile /etc/ssl/private/general-web.key
+       </IfFile>
+       <IfFile ! "/etc/ssl/local-certs/dehnerts-web.chain.crt">
+               #Warning "correct default cert not detected, falling back to snakeoil"
+               SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
+               SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
+       </IfFile>
 
        #   Server Certificate Chain:
        #   Point SSLCertificateChainFile at a file containing the