Installing SSL on Moodle4Mac

Installing SSL on Moodle4Mac

by Freddie Gay -
Number of replies: 5

Hello

I need to run Moodle on my Mac over https. I installed Moodle4Mac and Moodle worked fine on localhost:8888/moodle35. I then installed certificate following steps here: https://really-simple-ssl.com/knowledge-base/how-to-install-an-ssl-certificate-on-mamp/

The certificate was installed okay because the MAMP homepage runs over https no problem e.g. https://localhost/MAMP/. However Moodle does not load (neither with or without https). I changed the Moodle config.php $CFG->wwwroot   = 'https://localhost:8888/moodle35' as it is stated this should be done in the Moodle docs but the connection is still rejected.

Does anyone know what the problem may be here?

Average of ratings: -
In reply to Freddie Gay

Re: Installing SSL on Moodle4Mac

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I could only get this working when I initially set up ssl prior to install.  I still get warning about certificate not being from a recognized authority (used self created mamp cert) but it does at least run.

Average of ratings: Useful (1)
In reply to Emma Richardson

Re: Installing SSL on Moodle4Mac

by Freddie Gay -

Hi Emma

I've tried installing the SSL and then downloading the Moodle and MAMP package but still have the same problem (the httd.conf and httpd-ssl.conf can only be edited or replaced in Apache after installing).

After configuring the SSL I tried replacing the Moodle35 folder with the latest release (e.g. the one that is not packaged with MAMP) and this took me to the installation process for Moodle when accessing localhost:8888/moodle35

However, after choosing the database driver improved 'Improved MySQL' I get the following error message:

Error: Database connection failed

It is possible that the database is overloaded or otherwise not running properly.

The site administrator should also check that the database details have been correctly specified in config.php

Warning: mysqli::__construct(): (HY000/1045): Access denied for user ''@'localhost' (using password: NO) in /Applications/MAMP/htdocs/moodle35/lib/dml/mysqli_native_moodle_database.php on line 79

Hoping somebody can help with this! Is there anything I need to change in the config.php file?

In reply to Freddie Gay

Re: Installing SSL on Moodle4Mac

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Normally (if this is just a local install) I just use root as the database user (mamp default root password is root as well).  Sounds like you do not have the database referenced correctly - you could just delete the config.php file and then let it run as a fresh install and reference the database you have.


In reply to Freddie Gay

Re: Installing SSL on Moodle4Mac

by Ken Task -
Picture of Particularly helpful Moodlers

Confession ... when, in the past, I did run MAMP (whatever) off localhost, opted to make the exception in FireFox and be done with it.   Wouldn't be 'sharing' the link with anyone anyway ... nor inviting anyone to access.

Are you using Chrome?

In July, Chrome dramatically expanded “Not Secure” warnings to include all HTTP pages.

https://www.blog.google/products/chrome/milestone-chrome-security-marking-http-not-secure/

And some other resources you might find 'better'?

https://addons.mozilla.org/en-US/firefox/addon/https-everywhere/

https://letsencrypt.org/docs/certificates-for-localhost/

Of the last two resources, think I'd opt to work on letsencrypt.  Why?   One can setup a true server to use LetsEncrypt so localhost might be slightly different, but one would be familiar with the setups for true server as well.

Realize this response doesn't really answer your question, but ....

Response is also 2 cent opinion!   But what the hey ... it's free? smile

'spirit of sharing', Ken


In reply to Freddie Gay

Re: Installing SSL on Moodle4Mac

by Casie Smith -

It's not working it is possible that the database is overloaded or otherwise not running properly, and I also found other software for increasing download speed and its go2top that help you achieve best acceleration performance.