In order to support an external SCORM player such as the SSLA player, additional Nginx configuration is needed.
- The files
/edx/app/nginx/sites-enabled/lms
and/edx/app/nginx/sites-enabled/lms
are generated by the Nginx Ansible role at/edx/app/edx_ansible/edx_ansible/playbooks/roles/nginx
from theconfiguration
repository https://github.com/edx/configuration. Thelms
andcms
Nginx configuration files are generated from Jinja2lms.j2
andcms.j2
templates in/edx/app/edx_ansible/edx_ansible/playbooks/roles/nginx/templates/edx/app/nginx/sites-available
directory.
- Copy the files to include, extra_locations_lms.j2 and static-files-extra.j2 into the
/edx/app/edx_ansible/edx_ansible/playbooks/roles/nginx/templates/edx/app/nginx/sites-available
directory. (Appsembler's fork of /edx/configuration adds these files to the.gitignore
file so they will not interfere with subsequentgit pull
s.)
-
Add Nginx
include
statements to pull in your own external.j2
templates, following instructions below. (Appsembler has added these include statements to our fork of edx/configuration- Edit
/edx/app/edx_ansible/edx_ansible/playbooks/roles/nginx/templates/edx/app/nginx/sites-available/lms.j2
. Add the following just below{% include "static-files.j2" %}
and just above the last closing}
.
{% include "extra_locations_lms.j2" ignore missing %}
- Edit
/edx/app/edx_ansible/edx_ansible/playbooks/roles/nginx/templates/edx/app/nginx/sites-available/static-files.j2
. Add the following just aboveexpires epoch
:
{% include "static-files-extra.j2" ignore missing %}
- You do not need to edit
cms.j2
.
- Edit
Note: If your configuration directory (edx_ansible/edx_ansible
) on the server is checked out from GitHub, as it most likely is, these two files will be marked as modified and will cause further git pull
s from /edx/configuration to fail when running /edx/bin/update
or otherwise running any Ansible playbook which pulls updates from GitHub to the edx_ansible code directory. (not relevant for Appsembler's fork of /edx/configuration)
-
Once you have done this, rerun the Nginx Ansible role for the LMS and CMS sites with this commands on your edxapp server.
sudo /edx/app/edx_ansible/venvs/edx_ansible/bin/ansible-playbook -i localhost, -c local /edx/app/edx_ansible/edx_ansible/playbooks/run_role.yml -e"role=nginx" -e"@/edx/app/edx_ansible/edx_ansible/playbooks/roles/edxapp/defaults/main.yml" -e"@/edx/app/edx_ansible/server-vars.yml" -e'{"nginx_sites":["lms", "cms"], "nginx_default_sites": ["lms"]}' -t install:configuration -vvv
-
This will update the
lms
andcms
configuration on Nginx and should reload the Nginx configuration. To make sure you have the new configuration in place,:
sudo service nginx configtest
sudo service nginx reload
You should now be able to use the SCORM XBlock.