I have an A-record pointing to the public IP of my web server. Web configuration file permanently redirects to using https and that the certificates are located correctly to the path specified. However, when I use another computer and issue: curl -I <subdomain.domain.com>
I received the following output:
user@machine:~# curl -I <subdomain.domain.com>
HTTP/1.1 301 Moved Permanently
Date: Tue, 02 May 2023 06:58:42 GMT
Connection: keep-alive
Cache-Control: max-age=3600
Expires: Tue, 02 May 2023 07:58:42 GMT
Has my certificate expires? I am using the wild card certificate and checked that the expiry date has not arrived. Why is there an output says that it has expires?
Another thing I noticed is that if the certificates specified in the web config path should be the ones it is using, but when I launch the URL <subdomain.domain.com>, there is a lock icon (indicating it is using https), the certificate appeared to be issued by Cloudflare. Why is the certificate “issued” by Cloudflare when the wild card certificate purchased was not from Cloudflare?
I would suspect that the SSL Mode in your Cloudflare is set to Flexible. Set this to Full (Strict). The issue is that your Origin is redirecting to HTTPS, but Cloudflare is configured to talk to your Origin only over HTTP.
the web server webconfig for port 80 all commented out. Only port 443 is configured for this <subdomain.domain.com> site.
in the Cloudflare DNS setting for the , it is “DNS only”
having use the command curl https://subdomain.domain.com, I do not have any error, instead the body of the page (from the curl output) shows exactly the same as if I browse to that url using a browser; the page shows the web server landing page instead
I did restarted the web server, no error whatsoever and no changes in the configuration was done.
More information, in the Cloudflare, there is an entry in the load balancing showing 2 web servers; both are healthy. From my question earlier, I do not know if it is due to the SSL, but is there any SSL certificate need to be purchased and place inside Cloudflare?