Let's encrypt and https

Re: Let's encrypt and https

by Emma Richardson -
Number of replies: 10
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

You might check that you don't have an https option in siteground that needs turned on too - I would talk to their tech support as a timeout sounds like more of a server issue than a moodle issue.

In reply to Emma Richardson

Re: Let's encrypt and https

by Javier Tejera -
I've contacted then and their response is that somewhere in my files I have a HTTP. Really weird, not working anything at all.

Not sure if this is important, but this Moodle site is a subdomain of my "main website", but this subdomain has his own hosting plan totally independent from the main one. Has this subdomain something to do with it?


In reply to Javier Tejera

Re: Let's encrypt and https

by Ken Task -
Picture of Particularly helpful Moodlers

You might review documentation for LetsEncrypt.

https://letsencrypt.org/getting-started/

They have this:

https://certbot.eff.org/

a little tool for getting directions specific to how you are running your server.  Link above has this atop the page:

"Trying to get a wildcard certificate? Please use the dropdown menus below to get instructions specific to your system, and read those instructions carefully."

When you say 'subdomain' ... you have a web site @ www.yourdomain.tld and the moodle is something like moodle.yourdomain.tld ... is that correct?

I would think, you would want a 'wildcard' cert that would cover/be good for www. site as well as moodle. site.

Don't use LetsEncrypt so the above is really some 'leg work' for ya ... I hope!

'spirit of sharing', Ken


In reply to Ken Task

Re: Let's encrypt and https

by Javier Tejera -

PROBLEM SOLVED:

The root directory contained an ‘.htaccess’ file with the following lines:

RewriteEngine On

RewriteCond %{SERVER_PORT} 443

RewriteRule ^(.*)$ http://academy.volunteeredinburgh.org.uk/$1 [R=301,L]

This was causing a redirect loop when attempting access via https instead of http. Solution was to delete this file.

Thanks all for the support.


In reply to Javier Tejera

Re: Let's encrypt and https

by Andy Hoang -

Hey Javier, I'm in the exact same situation. I'm also using Siteground and in my case I accidentally turned on HTTPS using Lets Encrypt. So I've changed http ->https in the config.php and can access the dashboard. However, any admin pages, including the site administration menu doesn't load. 

This also means I can't access /admin/tool/replace as this is in the admin folder and for some reason everything in there is not loading up.

Javier, how did you manage to find that rogue http reference inside the .htaccess file? 

In reply to Andy Hoang

Re:

by Javier Tejera -
Hi Andy, sorry for getting back to you so late. Did you manage to solve this issue?
In reply to Javier Tejera

Re:

by Andy Hoang -
I did manage to solve this with help from Siteground, who were excellent. As I had switched https on by accident, I got them to roll back to a backed up version. This didn't work initially and they traced the problem back to some modification that was made during the installation of LetsEncrypt, but I can't remember what that was now as it was a while ago.

All solved now though!
In reply to Andy Hoang

Re:

by Javier Tejera -
Glad to hear that, Andy! However, if I understood correctly it seems to me that now you are running your Moodle without HTTPS?

By the way, my experience with Siteground customer service is pretty good too. They are excellent, to be honest.
Average of ratings: Useful (1)
In reply to Javier Tejera

Re:

by Andy Hoang -

Yup I've been with Siteground a while and am always impressed with their customer service. 

Yes I'm running my personal moodle as a http only as it's only a testing site for me to mess about with. The one at work that I run is obviously https and i tend not to do reckless experimentation with that one!

In reply to Andy Hoang

Re:

by Javier Tejera -
If it's for testing purpose, it's Ok then!
I have created a staging environment within Siteground where I do all the experimentation (including upgrades), which is a mirror of the production site. If it works, either I push it to the production site or I replicate the same steps in the production site under maintenance mode. Pretty simple and it made my life much easier!