Skip to content

Configuring qbank with Apache

cjshawMIT edited this page Mar 29, 2018 · 5 revisions

Introduction

This page walks through how we configure qbank to work with mod_wsgi and Apache 2.4. You should be able to set up qbank similarly with other configurations, like uwsgi and nginx, but you will have to figure out the details.

qbank Code

Instead of using the code on the master branch, you can use the code on the feature/cs/ec2 branch. There are two main changes in main.py:

  1. Remove the SSL certificate configuration.
  2. How the app gets initialized.

Apache Config

We basically follow the examples given in the web.py documentation. The relevant parts of our config are below, for reference:

		WSGIScriptAlias / /var/www/webapps/qbank-lite/main.py/
		AddType text/html .py
		<Directory /var/www/webapps/qbank-lite>
			Options Indexes FollowSymLinks Includes ExecCGI
			AllowOverride All
			Order deny,allow
			Allow from all
		</Directory>

If you decide to route qbank through a reverse proxy instead of it's own dedicated port or use a port other than 8080, you will also have to update all the tool configurations that talk to qbank. This means:

  • Open Assessments's _head.html.
  • Unplatform's settings.py for logging and assessment URLs.
  • Any embedded iframes in ePub content.

Other Web Servers

You can try the documentation provided on the web.py site.