Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
The operating system my web server runs on is (include version): CentOS 7
My hosting provider, if applicable, is: One of the shareholders of my company
I can login to a root shell on my machine (yes or no, or I don’t know): yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no
Extra> >result of certbot certificate
[root@zedelitoral ~]# certbot certificates
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Cannot extract OCSP URI from /etc/letsencrypt/live/zedelitoral.ec/cert.pem
Found the following certs:
Certificate Name: zedelitoral.ec
Domains: zedelitoral.ec www.zedelitoral.ec
Expiry Date: 2018-10-07 15:20:36+00:00 (VALID: 87 days)
Certificate Path: /etc/letsencrypt/live/zedelitoral.ec/fullchain.pem
Private Key Path: /etc/letsencrypt/live/zedelitoral.ec/privkey.pem
If you use RewriteCond %{HTTPS} on on a VirtualHost that is not using TLS it never will match that condition, also RewriteCond %{HTTP_HOST} !^www.\. is not correct you should remove the first dot RewriteCond %{HTTP_HOST} !^www\.
If you only want to redirect all domains to https:///www.zedelitoral.ec remove those rules and add a Redirect.
Regarding the certificate issue with domains that are not wwww., could you please show this conf file /etc/httpd/sites-available/zedelitoral.ec-le-ssl.conf?.
Great, now you need to know the reason why https://zedelitoral.com is not showing the right cert, I suppose you have defined it on another ServerName or ServerAlias taking precedence to zedelitoral.ec-le-ssl.conf
As a quick test you could edit httpd.conf file and change the order of the includes:
Before:
IncludeOptional conf.d/*.conf
IncludeOptional sites-enabled/*.conf
Include /etc/httpd/sites-available/zedelitoral.ec-le-ssl.conf
After:
Include /etc/httpd/sites-available/zedelitoral.ec-le-ssl.conf
IncludeOptional conf.d/*.conf
IncludeOptional sites-enabled/*.conf
Restart Apache and try again.
Anyway, could you please execute this command and show the output?.