That no longer works.
When I copy the phpMyAdmin directory inside a website directory, it can be accessed like this: https://www.mydomain.com/phpmyadmin
However, I don’t like this setup, for some reason - would prefer to keep using it from a separate directory.
What I tried was setting up Cloudflare DNS:
A phpmyadmin - pointing to the IP address of the host, just like other DNS records in Cloudflare (mydomain, subdomain etc.).
Bought the SSL certificate AFTER setting up all these DNS records in Cloudflare, and it says the cert covers *.mydomain.com.
I can access phpMyadmin when I switch off “Always use HTTPS” in Crypto options, but then I’m accessing phpMyadmin without https - don’t like that too much. If that’s on, I can’t. It shows Error 526 - invalid certificate.
I can also access it, with https when it’s copied in the folder of the website (mydomain.com/phpmyadmin).
Means that Cloudflare can’t validate your origin certificate.
Ensure your server has a valid certificate for your domain (issued through trusted CA, not expired…)
I can imagine that the vHost for phpMyAdimin uses a different cert
You can verify this quickly by setting SSL from Full(Strict) to Full. If you diont’ want to change it for your entire zone use a… page rule for it
I’m out of the (three free) page rules.
Used two rules to stop caching when updating the (wordpress) site, and the third one is for the mess with the change of the subdomain address - to enable old links to still work.
Not that I’d be happy solving it that way even if I had some left.
mydomain.com/phpmyadmin works.
However, correct me if I’m wrong, that means it has to be coppied inside the mydomain.com directory. Don’t like that.
phpmyadmin.mydomain.com exists as a directory and works without the Cloudflare. I want to enable it to work with the Cloudflare. And to point at that same location.
Did I explain my problem clearly - new to this, not sure yet with all the terms.
I set the phpmyadmin in Cloudflare DNS section.
After that i bougth the Cloudflare SSL “Dedicated SSL certificate”.
Was it stupid not to have waited a few days for the DNS to “start working”? Thinking if that could be the cause - can’t figure any other reason why it would work, but not with https and give the “invalid certificate” error with https.
I had thought - it’s a DNS “rule” in Cloudflare’s DNS field, and I’m requesting a SSL from Cloudflare, so it will work right away - maybe that was a mistake.
Like said, just thinking out loud, really not sure what the cause of the problem is. From this point of view and the (little) knowledge I have - don’t see why else it won’t work.
But it does work - with strict. At least for the webiste and the subdomain.
I guess Cloudflare could be using host provider’s SSL to communicate wit the server, although I didn’t buy, nor install any SSL on the host for my site - just at the Cloudflare?
If host cert were the problem, even the website wouldn’t work with “Full (strict)” setting, would it?
A bit wiser now. Not 100% sure it will work - not until it is tested. Anyway:
My host gives free SSL to all the registered domains and subdomains. That SSL is recognized by Cloudflare. That is why Full (strict) encryption setting works.
The reason why newly added subdomains won’t work is because the host renews certificates in 30 (or 90, not sure) day intervals. At the next host certificate renewal, newly created subdomains will get their certificates, so they too should work too.
That just doesn’t sound right. Usually, new additions get a certificate provisioned upon creation. And then they fall into the periodic renewal. Have you asked them about SSL provisioning delays?
As for the host - checked. No certs after creation.
However, when checking that, I saw that an old “test” domain, had been previously created. It has a valid certificate at the host. It’s also set up with Cloudflare as well.
When I upload a simple, test index.html, or test.html, it won’t work.
Not like: https://test_subdomain.domain.com,
nor like: https://test_subdomain.domain.com/test.html
Returns Error 526 - invalid SSL certificate.
When I set SSL/TLS to Full (not strict), it returns a “c-panel” error "contact the administrator of test_subdomain.domain.com - site has been moved, or server is not configured correctly.
When I set SSL/TLS to off - then it returns 404. page not found error.
You should back up a step and go to Cloudflare DNS and set that domain to while you sort it out. With , it goes straight to the server, so you can get a better idea of what your server’s SSL configuration is.
With it set to , try HTTPS in your browser, and also try HTTP. Let us know how that goes.
phpMyAdmin uses their own Self-Signed Cert, and when you have Crypto set to Full Cloudflare says invalid as it is SelfSigned (not trusted by Cloudflare).
Not sure your server setup but find the phpMyAdmin config file and point the SSL settings to your Cloudflare cert.