Domain Name Change & SSL Errors?

Hello, any help would be greatly appreciated. I've been working on this for a long time.

My domain is: gro-usa.com

The operating system my web server runs on is (include version): Ubuntu 20.04

My hosting provider, if applicable, is: DigitalOcean

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 0.40.0

Initially I was developing a Wordpress website on silverstreamsynergy.com. I had to change the website to gro-usa.com so I changed the configuration in Wordpress to point to gro-usa.com. I have deleted, revoked, created, renewed, and done all sorts of other things with the certificates. Currently if you go to the url www.gro-usa.com it will redirect you to silverstreamsynergy.com. I am not sure why, since it shouldn't be going here. I have changed the configuration of Wordpress in many ways, and my server's DNS is not setup to have www.gro-usa.com point to silverstreamsynergy.com. In fact, it is setup so that silverstreamsynergy.com points to gro-usa.com. This is the only way to get gro-usa.com accessible. And, for some reason, when you go to gro-usa.com it will redirect you to silverstreamsynergy.com and tell you it is not safe, then if you go under Advanced and go to the site anyway it will bring you to gro-usa.com again. How could there be a redirect like this? Or is it even a redirect? I don't know. When you go to gro-usa.com it redirects you to silverstreamsynergy.com and on chrome it says ERR_CERT_COMMON_NAME_INVALID, and for some reason "Subject: gro-usa.com" even though the url is silverstreamsynergy.com? There is only one server all this is on.

Here is what shows when I run certbot certificates

Found the following certs:
Certificate Name: gro-usa.com
Domains: gro-usa.com www.gro-usa.com
Expiry Date: 2021-06-27 18:32:07+00:00 (VALID: 87 days)
Certificate Path: /etc/letsencrypt/live/gro-usa.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/gro-usa.com/privkey.pem
Certificate Name: www.gro-usa.com
Domains: www.gro-usa.com
Expiry Date: 2021-06-28 02:46:28+00:00 (VALID: 88 days)
Certificate Path: /etc/letsencrypt/live/www.gro-usa.com/fullchain.pem
Private Key Path: /etc/letsencrypt/live/www.gro-usa.com/privkey.pem

Please help, I feel like I have made a mess of this server and am not sure what the issue is. Thank you all for any advice.

1 Like

Welcome to the Let's Encrypt Community, Riley :slightly_smiling_face:

You might need to verify that the "WordPress Address (URL)" and "Site Address (URL)" in the WordPress settings have the correct address.

Update: Upon further inspection, it appears that Apache is redirecting from http://gro-usa.com to https://silverstreamsynergy.com/ then WordPress is redirecting from https://silverstreamsynergy.com/ to https://gro-usa.com/. You can see this happening here:

redirect-checker.org

Visiting https://gro-usa.com directly works, but visiting http://gro-usa.com then being redirected to https://silverstreamsynergy.com/ results in the certificate for gro-usa.com being served (before being redirected to https://gro-usa.com/), which won't work since it's for the wrong domain name. Correcting the Apache redirect should fix things.

What is the output of apachectl -S ?

1 Like

This is my output for apachectl -S. Thank you for the response.

1 Like

Please run:

sudo apachectl -S

1 Like

What is the complete output of sudo certbot certificates ?

1 Like

1 Like

1 Like

Let's fix that.

What does /etc/apache2/sites-available/000-default-le-ssl.conf contain?

Please put three backticks ``` alone on a line both above and below the contents to make it more readable.

1 Like

Additionally, for thoroughness, what are the outputs of these commands?

sudo ls -la /etc/apache2/sites-available

sudo ls -la /etc/apache2/sites-enabled

sudo ls -lRa /etc/letsencrypt/archive

sudo ls -lRa /etc/letsencrypt/live

1 Like
<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                ServerAdmin webmaster@localhost

                DocumentRoot /var/www/html

                # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
                # error, crit, alert, emerg.
                # It is also possible to configure the loglevel for particular
                # modules, e.g.
                #LogLevel info ssl:warn

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined

                # For most configuration files from conf-available/, which are
                # enabled or disabled at a global level, it is possible to
                # include a line for only one particular virtual host. For example the
                # following line enables the CGI configuration for this host only
                # after it has been globally disabled with "a2disconf".
                #Include conf-available/serve-cgi-bin.conf

                #   SSL Engine Switch:
                #   Enable/Disable SSL for this virtual host.
                SSLEngine on

                #   A self-signed (snakeoil) certificate can be created by installing
<IfModule mod_ssl.c>
        <VirtualHost _default_:443>
                ServerAdmin webmaster@localhost

                DocumentRoot /var/www/html

                # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
                # error, crit, alert, emerg.
                # It is also possible to configure the loglevel for particular
                # modules, e.g.
                #LogLevel info ssl:warn

                ErrorLog ${APACHE_LOG_DIR}/error.log
                CustomLog ${APACHE_LOG_DIR}/access.log combined

                # For most configuration files from conf-available/, which are
                # enabled or disabled at a global level, it is possible to
                # include a line for only one particular virtual host. For example the
                # following line enables the CGI configuration for this host only
                # after it has been globally disabled with "a2disconf".
                #Include conf-available/serve-cgi-bin.conf

                #   SSL Engine Switch:
                #   Enable/Disable SSL for this virtual host.
                SSLEngine on

                #   A self-signed (snakeoil) certificate can be created by installing
                #   the ssl-cert package. See
                #   /usr/share/doc/apache2/README.Debian.gz for more info.
                #   If both key and certificate are stored in the same file, only the
                #   SSLCertificateFile directive is needed.
                SSLCertificateFile      /etc/ssl/certs/ssl-cert-snakeoil.pem
                SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

                #   Server Certificate Chain:
                #   Point SSLCertificateChainFile at a file containing the
                #   concatenation of PEM encoded CA certificates which form the
                #   certificate chain for the server certificate. Alternatively
                #   the referenced file can be the same as SSLCertificateFile
                #   when the CA certificates are directly appended to the server
                #   certificate for convinience.
                #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt

                #   Certificate Authority (CA):
                #   Set the CA certificate verification path where to find CA
                #   certificates for client authentication or alternatively one
                #   huge file containing all of them (file must be PEM encoded)
                #   Note: Inside SSLCACertificatePath you need hash symlinks
                #                to point to the certificate files. Use the provided
                #                Makefile to update the hash symlinks after changes.
                #SSLCACertificatePath /etc/ssl/certs/
                #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt

                #   Certificate Revocation Lists (CRL):
                #   Set the CA revocation path where to find CA CRLs for client
                #   authentication or alternatively one huge file containing all
                #   of them (file must be PEM encoded)
                #   Note: Inside SSLCARevocationPath you need hash symlinks
                #                to point to the certificate files. Use the provided
                #                Makefile to update the hash symlinks after changes.
                #SSLCARevocationPath /etc/apache2/ssl.crl/
                #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl

                #   Client Authentication (Type):
                #   Client certificate verification type and depth.  Types are
                #   none, optional, require and optional_no_ca.  Depth is a
                #   number which specifies how deeply to verify the certificate
                #   issuer chain before deciding the certificate is not valid.
                #SSLVerifyClient require
                #SSLVerifyDepth  10

                #   SSL Engine Options:
                #   Set various options for the SSL engine.
                #   o FakeBasicAuth:
                #        Translate the client X.509 into a Basic Authorisation.  This means that
                #        the standard Auth/DBMAuth methods can be used for access control.  The
                #        user name is the `one line' version of the client's X.509 certificate.
                #        Note that no password is obtained from the user. Every entry in the user
                #        file needs this password: `xxj31ZMTZzkVA'.
                #   o ExportCertData:
                #        This exports two additional environment variables: SSL_CLIENT_CERT and
                #        SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
                #        server (always existing) and the client (only existing when client
                #        authentication is used). This can be used to import the certificates
                #        into CGI scripts.
                #   o StdEnvVars:
                #        This exports the standard SSL/TLS related `SSL_*' environment variables.
                #        Per default this exportation is switched off for performance reasons,
                #        because the extraction step is an expensive operation and is usually
                #        useless for serving static content. So one usually enables the
                #        exportation for CGI and SSI requests only.
                #   o OptRenegotiate:
                #        This enables optimized SSL connection renegotiation handling when SSL
                #        directives are used in per-directory context.
                #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
                <FilesMatch "\.(cgi|shtml|phtml|php)$">
                                SSLOptions +StdEnvVars
                </FilesMatch>
                <Directory /usr/lib/cgi-bin>
                                SSLOptions +StdEnvVars
                </Directory>

                #   SSL Protocol Adjustments:
                #   The safe and default but still SSL/TLS standard compliant shutdown
                #   approach is that mod_ssl sends the close notify alert but doesn't wait for
                #   the close notify alert from client. When you need a different shutdown
                #   approach you can use one of the following variables:
                #   o ssl-unclean-shutdown:
                #        This forces an unclean shutdown when the connection is closed, i.e. no
                #        SSL close notify alert is send or allowed to received.  This violates
                #        the SSL/TLS standard but is needed for some brain-dead browsers. Use
                #        this when you receive I/O errors because of the standard approach where
                #        mod_ssl sends the close notify alert.
                #   o ssl-accurate-shutdown:
                #        This forces an accurate shutdown when the connection is closed, i.e. a
                #        SSL close notify alert is send and mod_ssl waits for the close notify
                #        alert of the client. This is 100% SSL/TLS standard compliant, but in
                #        practice often causes hanging connections with brain-dead browsers. Use
                #        this only for browsers where you know that their SSL implementation
                #        works correctly.
                #   Notice: Most problems of broken clients are also related to the HTTP
                #   keep-alive facility, so you usually additionally want to disable
                #   keep-alive for those clients, too. Use variable "nokeepalive" for this.
                #   Similarly, one has to force some clients to use HTTP/1.0 to workaround
                #   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
                #   "force-response-1.0" for this.
                # BrowserMatch "MSIE [2-6]" \
                #               nokeepalive ssl-unclean-shutdown \
                #               downgrade-1.0 force-response-1.0

        </VirtualHost>
</IfModule>

1 Like

Thanks for that. Let's see here...

1 Like

First time using this forum sorry! Haha.

1 Like

Happens all the time. You're doing great. :slightly_smiling_face:

2 Likes
root@wordpress-ubuntu-s-1vcpu-1gb-nyc1-01:/etc/apache2/sites-available# sudo ls -la /etc/apache2/sites-available
total 24
drwxr-xr-x 2 www-data www-data 4096 Mar 31 23:24 .
drwxr-xr-x 8 www-data www-data 4096 Mar 30 04:02 ..
-rw-r--r-- 1 www-data www-data  511 Dec 16 14:56 000-default.conf
-rw-r--r-- 1 www-data www-data 1332 Apr 13  2020 000-default.conf.dpkg-dist
-rw-r--r-- 1 www-data www-data 7562 Mar 31 23:21 default-ssl.conf
root@wordpress-ubuntu-s-1vcpu-1gb-nyc1-01:/etc/apache2/sites-available#
root@wordpress-ubuntu-s-1vcpu-1gb-nyc1-01:/etc/apache2/sites-available# sudo ls -la /etc/apache2/sites-enabled
total 16
drwxr-xr-x 2 www-data www-data 4096 Mar 30 04:02 .
drwxr-xr-x 8 www-data www-data 4096 Mar 30 04:02 ..
-rw-r--r-- 1 root     root     1095 Mar 30 04:02 000-default-le-ssl.conf
-rw-r--r-- 1 www-data www-data  745 Mar 17 23:36 000-default.conf
root@wordpress-ubuntu-s-1vcpu-1gb-nyc1-01:/etc/apache2/sites-available#
root@wordpress-ubuntu-s-1vcpu-1gb-nyc1-01:/etc/apache2/sites-available# sudo ls -lRa /etc/letsencrypt/archive
/etc/letsencrypt/archive:
total 16
drwx------ 4 root root 4096 Mar 31 22:23 .
drwxr-xr-x 9 root root 4096 Mar 31 23:12 ..
drwxr-xr-x 2 root root 4096 Mar 29 19:32 gro-usa.com
drwxr-xr-x 2 root root 4096 Mar 30 03:46 www.gro-usa.com

/etc/letsencrypt/archive/gro-usa.com:
total 72
drwxr-xr-x 2 root root 4096 Mar 29 19:32 .
drwx------ 4 root root 4096 Mar 31 22:23 ..
-rw-r--r-- 1 root root 1854 Mar 29 18:51 cert1.pem
-rw-r--r-- 1 root root 1854 Mar 29 18:52 cert2.pem
-rw-r--r-- 1 root root 1854 Mar 29 18:54 cert3.pem
-rw-r--r-- 1 root root 1854 Mar 29 19:32 cert4.pem
-rw-r--r-- 1 root root 1586 Mar 29 18:51 chain1.pem
-rw-r--r-- 1 root root 1586 Mar 29 18:52 chain2.pem
-rw-r--r-- 1 root root 1586 Mar 29 18:54 chain3.pem
-rw-r--r-- 1 root root 1586 Mar 29 19:32 chain4.pem
-rw-r--r-- 1 root root 3440 Mar 29 18:51 fullchain1.pem
-rw-r--r-- 1 root root 3440 Mar 29 18:52 fullchain2.pem
-rw-r--r-- 1 root root 3440 Mar 29 18:54 fullchain3.pem
-rw-r--r-- 1 root root 3440 Mar 29 19:32 fullchain4.pem
-rw------- 1 root root 1704 Mar 29 18:51 privkey1.pem
-rw------- 1 root root 1704 Mar 29 18:52 privkey2.pem
-rw------- 1 root root 1704 Mar 29 18:54 privkey3.pem
-rw------- 1 root root 1704 Mar 29 19:32 privkey4.pem

/etc/letsencrypt/archive/www.gro-usa.com:
total 40
drwxr-xr-x 2 root root 4096 Mar 30 03:46 .
drwx------ 4 root root 4096 Mar 31 22:23 ..
-rw-r--r-- 1 root root 1842 Mar 30 03:46 cert1.pem
-rw-r--r-- 1 root root 1842 Mar 30 03:46 cert2.pem
-rw-r--r-- 1 root root 1586 Mar 30 03:46 chain1.pem
-rw-r--r-- 1 root root 1586 Mar 30 03:46 chain2.pem
-rw-r--r-- 1 root root 3428 Mar 30 03:46 fullchain1.pem
-rw-r--r-- 1 root root 3428 Mar 30 03:46 fullchain2.pem
-rw------- 1 root root 1704 Mar 30 03:46 privkey1.pem
-rw------- 1 root root 1704 Mar 30 03:46 privkey2.pem
root@wordpress-ubuntu-s-1vcpu-1gb-nyc1-01:/etc/apache2/sites-available#
root@wordpress-ubuntu-s-1vcpu-1gb-nyc1-01:/etc/apache2/sites-available# sudo ls -lRa /etc/letsencrypt/live
/etc/letsencrypt/live:
total 20
drwx------ 4 root root 4096 Mar 31 22:23 .
drwxr-xr-x 9 root root 4096 Mar 31 23:12 ..
-rw-r--r-- 1 root root  740 Mar 17 23:36 README
drwxr-xr-x 2 root root 4096 Mar 29 19:32 gro-usa.com
drwxr-xr-x 2 root root 4096 Mar 30 03:46 www.gro-usa.com

/etc/letsencrypt/live/gro-usa.com:
total 12
drwxr-xr-x 2 root root 4096 Mar 29 19:32 .
drwx------ 4 root root 4096 Mar 31 22:23 ..
-rw-r--r-- 1 root root  692 Mar 29 18:51 README
lrwxrwxrwx 1 root root   35 Mar 29 19:32 cert.pem -> ../../archive/gro-usa.com/cert4.pem
lrwxrwxrwx 1 root root   36 Mar 29 19:32 chain.pem -> ../../archive/gro-usa.com/chain4.pem
lrwxrwxrwx 1 root root   40 Mar 29 19:32 fullchain.pem -> ../../archive/gro-usa.com/fullchain4.pem
lrwxrwxrwx 1 root root   38 Mar 29 19:32 privkey.pem -> ../../archive/gro-usa.com/privkey4.pem

/etc/letsencrypt/live/www.gro-usa.com:
total 12
drwxr-xr-x 2 root root 4096 Mar 30 03:46 .
drwx------ 4 root root 4096 Mar 31 22:23 ..
-rw-r--r-- 1 root root  692 Mar 30 03:46 README
lrwxrwxrwx 1 root root   39 Mar 30 03:46 cert.pem -> ../../archive/www.gro-usa.com/cert2.pem
lrwxrwxrwx 1 root root   40 Mar 30 03:46 chain.pem -> ../../archive/www.gro-usa.com/chain2.pem
lrwxrwxrwx 1 root root   44 Mar 30 03:46 fullchain.pem -> ../../archive/www.gro-usa.com/fullchain2.pem
lrwxrwxrwx 1 root root   42 Mar 30 03:46 privkey.pem -> ../../archive/www.gro-usa.com/privkey2.pem
root@wordpress-ubuntu-s-1vcpu-1gb-nyc1-01:/etc/apache2/sites-available#

Output of cat default-ssl.conf

1 Like

The output seems to have cut off at live. We definitely need to know what's in there to ensure it's correct.

1 Like

I see some concerns for sure. The sites-enabled directory should only contain symbolic links to configuration files in sites-available, not actual files.

1 Like

Since they're doing absolutely nothing right now anyhow, we can "backup" the files in sites-available.

sudo mkdir /etc/apache2/sites-available/backup

sudo mv /etc/apache2/sites-available/*.* /etc/apache2/sites-available/backup

sudo mv /etc/apache2/sites-enabled/*.* /etc/apache2/sites-available

1 Like

After running all of the commands in my previous post, what are the contents of these files:

/etc/apache2/sites-available/000-default.conf

/etc/apache2/sites-available/000-default-le-ssl.conf

1 Like

Sorry about that, I updated it to include the live command.

1 Like

Just so you know, I do not have a 000-default-le-ssl.conf file but I do have a default-sss.conf and that is what I showed the output of up above.

1 Like