Skip to content

Configuring with WSGI web server

cjshawMIT edited this page Mar 29, 2018 · 2 revisions

Introduction

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

To run assessments on a server, you will also have to set up qbank on a port or reverse proxy. Our instructions for that can be found on the qbank wiki.

NOTE if you configure qbank on a reverse proxy or use a port instead of 8080, you need to update the configuration for all tools that talk to qbank. Those are:

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

Unplatform Code

Instead of using the code on the master branch, you can use the code on the deploy-prod branch as a guide. 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/unplatform/main.py/
		AddType text/html .py
		<Directory /var/www/webapps/unplatform>
			Options Indexes FollowSymLinks Includes ExecCGI
			AllowOverride All
			Order deny,allow
			Allow from all
		</Directory>

Other Web Servers

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

Clone this wiki locally