Adding SSL Cert to Moodle

Adding SSL Cert to Moodle

per Under Dog -
Nombre de respostes: 11

MOODLE 3.3.4


Hello,


We just had an EV SSL cert installed for our Moodle site on our server but it still shows as being "not secure" in the address bar.


Is there a setting I need to change somewhere to get the green lock and our company to show in those in the address bar?


Thanks for the help.



Mitjana de qualificacions: -
En resposta a Under Dog

Re: Adding SSL Cert to Moodle

per Visvanath Ratnaweera -
Imatge Particularly helpful Moodlers Imatge Translators
En resposta a Visvanath Ratnaweera

Re: Adding SSL Cert to Moodle

per Under Dog -

Thanks for the link.  I just had a look and it looks a bit more technical than I thought.

All of my courses are SCORM so does that mean I have to go into each SCORM course and re-direct them?


Cheers!

En resposta a Under Dog

Re: Adding SSL Cert to Moodle

per Howard Miller -
Imatge Core developers Imatge Documentation writers Imatge Particularly helpful Moodlers Imatge Peer reviewers Imatge Plugin developers
En resposta a Howard Miller

Re: Adding SSL Cert to Moodle

per Under Dog -

Is it as simple as adding the re-direct in the htaccess file?


Cheers,


En resposta a Under Dog

Re: Adding SSL Cert to Moodle

per Jon Bolton -
Imatge Testers

It may be that simple - see Redirecting the HTTP address to the new HTTPS address - but if you're asking these kind of questions about SSL, then I suspect you might need some help to assure yourself that it's all been installed properly and that everything is as working as you think (hope!) it is.

I'm not being patronising btw, simply pointing out that server configuration and administration is a complex area if that's not your day job.

En resposta a Jon Bolton

Re: Adding SSL Cert to Moodle

per Under Dog -

Hi Jon,


Not to worry......you are spot on!  I have a Moodle dev team that is going to sort it now.  I was hoping for a simple tick box in the admin panel to sort it or something easy like that.


Thanks!

En resposta a Jon Bolton

Re: Adding SSL Cert to Moodle

per Under Dog -

Hi Jon,


Not to worry......you are spot on!  I have a Moodle dev team that is going to sort it now.  I was hoping for a simple tick box in the admin panel to sort it or something easy like that.


Thanks!

En resposta a Jon Bolton

Re: Adding SSL Cert to Moodle

per Visvanath Ratnaweera -
Imatge Particularly helpful Moodlers Imatge Translators
Hi Jon

There is an incredibily simple trick mit "rewrite". Put this single line in the .conf file for the HTTP (not HTTPS):
Redirect permanent / https://example.com/
En resposta a Visvanath Ratnaweera

Re: Adding SSL Cert to Moodle

per Jon Bolton -
Imatge Testers

I know, I’m not asking the question 😉

But that will only redirect the http index to the https index - it won’t rewrite any http page to its https equivalent. The solution in the Moodle docs mentioned above does do that.

And the OP may not have access to the conf file on the server but probably will have access to an htaccess file, which will still allow the rewrite.

En resposta a Jon Bolton

Re: Adding SSL Cert to Moodle

per Visvanath Ratnaweera -
Imatge Particularly helpful Moodlers Imatge Translators
Hi Jon

I knew that. That's why the post was addressed to you. I found this trick much more compact than the usual ULP rewriting of Apache. Of course, the HTTPS site referenced there must exist, sllo does its Apache .conf file.
En resposta a Under Dog

Re: Adding SSL Cert to Moodle

per Afflo Spark -
You can use apache .htaccess feature to redirect your whole website to HTTPS.


You can use this code which will redirect all your website's requests on port 80 {used by Http} to port 443 (SSL)


RewriteEngine On 

RewriteCond %{HTTP_HOST} ^domain.com [NC]

RewriteCond %{SERVER_PORT} 80 

RewriteRule ^(.*)$ https://domain.com/$1 [R,L]