简体   繁体   中英

Multiple SSL Certificates break Apache

I have a website that uses HTTPS (already setup and working). Now I am trying to add a second website with HTTPS, but when I restart apache, apache crashes (without an error).

In the error_log I find this:

    [Wed Mar 07 03:41:14 2018] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.6.33 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips configured -- resuming normal operations
[Wed Mar 07 03:42:16 2018] [notice] SIGHUP received.  Attempting to restart
[Wed Mar 07 03:42:16 2018] [notice] Digest: generating secret for digest authentication ...
[Wed Mar 07 03:42:16 2018] [notice] Digest: done
[Wed Mar 07 03:42:32 2018] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed Mar 07 03:42:32 2018] [notice] Digest: generating secret for digest authentication ...
[Wed Mar 07 03:42:32 2018] [notice] Digest: done

My VHosts look like that:

Working:

    <VirtualHost *:80 *:443>
    DocumentRoot /var/www/html/page/eng
    ServerName www.page.com
    ServerAlias page.com

    ErrorLog logs/page.com-error_log
    CustomLog logs/page.com-access_log common

    SSLEngine on
    SSLCertificateFile /etc/pki/tls/certs/page_certificate.cer
    SSLCertificateKeyFile /etc/pki/tls/private/page_private_key.key
    SSLCertificateChainFile /etc/pki/tls/certs/page_INTERMEDIATE.cer
</VirtualHost>

Not Working:

<VirtualHost *:80 *:443>
    DocumentRoot /var/www/html/page/de
    ServerName www.page.de
    ServerAlias page.de

    ErrorLog logs/page.de-error_log
    CustomLog logs/page.de-access_log common

    SSLEngine on
    SSLCertificateFile /etc/pki/tls/certs/page.de_ssl_certificate.cer
    SSLCertificateKeyFile /etc/pki/tls/private/page.de_private_key.key
    SSLCertificateChainFile /etc/pki/tls/certs/page.de_ssl_certificate_INTERMEDIATE.cer
</VirtualHost>

As long as "SSLEngine on" is not active on the second entry, everything works fine.

Any idea what the issue is / could be?

Thank you.

One idea is that your Apache version Apache/2.2.15 needs one more directive to allow name Virtual Hosting (in 2.4 it's no more necessary). Use it in the server context, not in the virtual host itself of course.

NameVirtualHost

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM