0

I have 3 wordpress sites, 1 moodle site and 1 owncloud site, all with same apache configuration in my vps, and all of them works fine

But I'm not able to make phpMyAdmin work with cloudflare's origin certificates. When I go to mysql.domain.tld it returns:

ERR_SSL_VERSION_OR_CIPHER_MISMATCH

But if I use Let's Encrypt it works fine

I use the following apache config file for all of my sites:

<VirtualHost *:80>
    ServerName domain.tld
    DocumentRoot "/var/www/domain.tld/"
    <Directory "/var/www/domain.tld/">
        AllowOverride All
    </Directory>
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =domain.tld
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    ErrorLog /var/log/apache2/domain.tld/error.log
</VirtualHost>

<VirtualHost *:443>
    ServerName domain.tld
    DocumentRoot "/var/www/domain.tld/"
    <Directory "/var/www/domain.tld/">
        AllowOverride All
    </Directory>
    SSLCertificateFile /etc/apache2/certificates/domain.tld.crt
    SSLCertificateKeyFile /etc/apache2/certificates/domain.tld.key
    ErrorLog /var/log/apache2/domain.tld/error.log
</VirtualHost>

What am I doing wrong? Thanks

DiogoSaraiva
  • 409
  • 4
  • 16

1 Answers1

1

Check that you can read the certificate:

openssl x509 -noout -text -in /etc/apache2/certificates/domain.tld.crt

Check the private key:

openssl rsa -in /etc/apache2/certificates/domain.tld.key -check

Verify that the private key and certificate are matching:

openssl rsa -noout -modulus -in /etc/apache2/certificates/domain.tld.key | openssl sha256
openssl x509 -noout -modulus -in /etc/apache2/certificates/domain.tld.crt | openssl sha256

Make sure that /etc/apache2/certificates/domain.tld.crt contains in this order:

  • the certificate for domain.tld
  • all intermediate certificates from CloudFlare
Mircea Vutcovici
  • 17,619
  • 4
  • 56
  • 83