Secure site corrupt after Let's Encrypt install

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.

My domain is:onestopmods.com

I ran this command: Option 2 redirect all HTTP

It produced this output:https://onestopmods.com/

My web server is (include version):Apache/2.4.18 (Ubuntu)
The operating system my web server runs on is (include version):
Ubuntu 16.04.3 x 64
My hosting provider, if applicable, is:Digital Ocean

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): SSH/Putty

You have <base href="http://138.68.184.238/" /> for some reason on your page, that makes all relative url requests go through unencrypted, which is forbidden for css, js and some other “active” resources. See also: https://www.whynopadlock.com

1 Like

Hi,

Thank you for your help with this.

As a result of you information I have now changed the name server to my site host Digital Ocean away from the registrant 123reg and I think I have all the correct DNS records.

All relative URL requests are still at IP level although I am aware such changes take a long time to propagate the internet. (It has been about 12 hours already.

Am I on the right track and how long should I wait to see if these changes work?

Best regards

David

Hi @OSM,

I don't really know what you mean but your problem is not related to your DNS, IP nor propagation. As @Nekit told you, your problem is a configuration issue, you must configure your OpenCart software so the urls constructed by this piece of software point to your https domain instead of http and your ip.

I don't use OpenCart but maybe this post How to Edit Store URL? - OpenCart Community could help to configure your OpenCart properly.

Cheers,
sahsanu

Hi sahsanu,

Thank you, I clearly need to read up more.!

  1. My thinking and confusion lies in the fact that everything other than the homepage on my site is currently showing IP rather than URL, categories, products, images, scripts etc … all IP related

  2. During installation I selected option 2 to redirect all non HTTPS requests and since Lets Encrypt is configured to recognise my domain name I have incorrectly assumed that correcting “1.” would redirect and encrypt all requests from my URL?

@OSM,

That is because you have not configured your OpenCart correctly and OpenCart is constructing all the references to pages, images, etc using your ip instead of your domain.

Right now, your site is being redirected from http://onestopmods.com to https://onestopmods.com so that is working fine, the problem is, as I said above, your OpenCart conf.

I've just installed OpenCart to know what is happening and seems you have this conf:

On config.php file you have this:

// HTTP
define('HTTP_SERVER', 'http://138.68.184.238/');

// HTTPS
define('HTTPS_SERVER', 'http://138.68.184.238/');

So you need to edit this file and modify the above lines to this:

// HTTP
define('HTTP_SERVER', 'http://onestopmods.com/');

// HTTPS
define('HTTPS_SERVER', 'https://onestopmods.com/');

On admin/config.php file you have this:

// HTTP
define('HTTP_SERVER', 'http://138.68.184.238/admin/');
define('HTTP_CATALOG', 'http://138.68.184.238/');

// HTTPS
define('HTTPS_SERVER', 'http://138.68.184.238/admin/');
define('HTTPS_CATALOG', 'http://138.68.184.238/');

and you should change that to:

// HTTP
define('HTTP_SERVER', 'http://onestopmods.com/admin/');
define('HTTP_CATALOG', 'http://onestopmods.com/');

// HTTPS
define('HTTPS_SERVER', 'https://onestopmods.com/admin/');
define('HTTPS_CATALOG', 'https://onestopmods.com/');

I hope this helps.

Cheers,
sahsanu

3 Likes

Wow, @sahsanu is really working hard to support Let’s Encrypt users! :trophy:

2 Likes

sahsanu has gone above and beyond what I expected. Thank you for your patience and understanding.

All sorted now.

David

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.