root@m2o-moodle:/etc/apache2/sites-available$ vi 030-moodle27-ssl.conf Note Use the virtual hosting configuration file that we have just created as a starting point.
Edit the first line as shown below so that the virtual hosting functions in HTTPS.
Note 443 is the HTTPS port.
Edit the log files as shown below in order to reflect the SSL virtual hosting instance.
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown Note star_contoso123_fr.crt is the wildcard SSL/TLS certificate of the domain *.contoso123.fr, star_contoso123_fr.keyis the private key and DigiCertCA.crt is the associated SSL/TLS chain certificate. Note For more information about the added SSL/TLS parameters, see the comments in the default SSL configuration file default-ssl.conf in the same directory.
Save the change and exit the text editor.
:wq
Activate the new configuration.
root@m2o-moodle:/etc/apache2/sites-available$ cd /etc/apache2/sites-enabled
Restart the Apache HTTP server to activate the SSL service and to apply the new configuration.
root@m2o-mysql:/etc/apache2/sites-enabled$ service apache2 restart
Run an Apache configuration test to check that the configuration files are OK.
root@m2o-moodle:/etc/apache2/sites-enabled$ apachectl configtest Note If everything is OK, the command returns Syntax OK.
38.Opening the rights on the Moodle configuration files
To open the rights on the Moodle configuration files, proceed with the following steps.
Whilst still working from the same SSH connection, authorize the editing of the Moodle configuration files so that the platform can be installed from the web.
root@m2o-moodle:/etc/apache2/sites-enabled$ cd /var/www
root@m2o-moodle:/var/www$ chmod o+w moodle27 Note For security reasons, remember to cancel this write authorization, once the platform has been installed from the web.
root@m2o-moodle:/var/www/moodle27$ chmod g+w mod blocks auth user/profile/field local mod/assign/submission mod/assign/feedback repository filter Note This operation is necessary for each type of plugin to be installed. In this case, the write authorization is only applied in the plugin directories corresponding to the types of plugins that we intend to install in our demonstration.