Moodle + Office 365: Better together


Installing the SSL/TLS certificate



Download 345.09 Kb.
Page9/13
Date29.07.2017
Size345.09 Kb.
#24227
1   ...   5   6   7   8   9   10   11   12   13

37.Installing the SSL/TLS certificate


To install the SSL/TLS certificate, proceed with the following steps:

  1. From the same SSH connection, activate the SSL/TLS service on the Apache HTTP server.


root@m2o-moodle:/etc/apache2/sites-enabled$ cd /etc/apache2/mods-enabled

root@m2o-moodle:/etc/apache2/mods-enabled$ ln -s ../mods-available/ssl.load

root@m2o-moodle:/etc/apache2/mods-enabled$ ln -s ../mods-available/ssl.conf

root@m2o-moodle:/etc/apache2/mods-enabled$ ln -s ../mods-available/socache_shmcb.load


  1. Create an SSL virtual hosting configuration file.


root@m2o-moodle:/etc/apache2/mods-enabled$ cd /etc/apache/sites-available

root@m2o-moodle:/etc/apache2/sites-available$ cp 030-moodle27.conf 030-moodle27-ssl.conf

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.

  1. Edit the first line as shown below so that the virtual hosting functions in HTTPS.



Note 443 is the HTTPS port.

  1. Edit the log files as shown below in order to reflect the SSL virtual hosting instance.


ErrorLog ${APACHE_LOG_DIR}/error_moodle27-ssl.log

CustomLog ${APACHE_LOG_DIR}/access_moodle27-ssl.log combined


  1. Add the lines before the tag.


SSLEngine on
SSLCertificateFile /home/moodleadmin/star_contoso123_fr.crt

SSLCertificateKeyFile /home/moodleadmin/star_contoso123_fr.key

SSLCertificateChainFile /home/moodleadmin/DigiCertCA.crt


SSLOptions +StdEnvVars




SSLOptions +StdEnvVars


BrowserMatch "MSIE [2-6]" \

nokeepalive ssl-unclean-shutdown \

downgrade-1.0 force-response-1.0

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.key is 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.

  1. Save the change and exit the text editor.


:wq


  1. Activate the new configuration.


root@m2o-moodle:/etc/apache2/sites-available$ cd /etc/apache2/sites-enabled

root@m2o-moodle:/etc/apache2/sites-enabled$ ln -s ../sites-available/030-moodle27-ssl.conf


  1. 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


  1. 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.

  1. 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.

  1. Apply a write authorization to the plugin directories, so that the plugins can be installed.


root@m2o-moodle:/var/www$ cd /var/www/moodle27

root@m2o-moodle:/var/www/moodle27$ chown www-data:www-data mod

root@m2o-moodle:/var/www/moodle27$ chown www-data:www-data blocks

root@m2o-moodle:/var/www/moodle27$ chown www-data:www-data auth

root@m2o-moodle:/var/www/moodle27$ chown www-data:www-data filter

root@m2o-moodle:/var/www/moodle27$ chown www-data:www-data user/profile/field

root@m2o-moodle:/var/www/moodle27$ chown www-data:www-data local

root@m2o-moodle:/var/www/moodle27$ chown www-data:www-data mod/assign/submission

root@m2o-moodle:/var/www/moodle27$ chown www-data:www-data mod/assign/feedback

root@m2o-moodle:/var/www/moodle27$ chown www-data:www-data repository

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.


Download 345.09 Kb.

Share with your friends:
1   ...   5   6   7   8   9   10   11   12   13




The database is protected by copyright ©ininet.org 2024
send message

    Main page