Project home: Original repository at:

Michael Buesch f82022e80a Update example macros 2 months ago
cms 3948643eb8 formfields: Add tab to default charset 2 months ago
example f82022e80a Update example macros 2 months ago
.gitignore 94df127121 .gitignore: Add __pycache__ 2 months ago
README.rst b886697d19 Remove obsolete Makefile and update README 2 months ago
TODO a4e0639a7f Remove header todo entry 2 months ago 47917de33a build: Enable -O3 2 months ago 1a27b66f22 Add cleaning helper script 2 months ago
cms-cli 6a03a38e7e cli: Enable debugging 2 months ago
index.wsgi ec74614855 Move wsgi application code to the cms module 2 months ago c6040adba0 setup: Add support for profile build 2 months ago f7eabd5077 Update cython build support 2 months ago

README.rst - simple WSGI/Python based CMS script

Copyright (c) 2011-2019 Michael Buesch


Just clone the cms.git repository to some directory where apache has access to.
In the configuration example below the directory will be ``/var/cms``

Then create the database directory named ``db`` inside of the cloned directory.
You may start with the example db:

``cp -r /var/cms/example/db /var/cms/``

Configuring Apache httpd

Install the Apache WSGI module. On Debian Linux, this is libapache2-mod-wsgi-py3.
Create a new config file /etc/apache2/conf.d/wsgi with content similar to
the following Debian based example:

.. code::

# Adjust "user" and "group" to your system.
WSGIDaemonProcess wsgi processes=10 threads=1 display-name=apache-wsgi user=www-data group=www-data python-path=/var/cms
WSGIPythonOptimize 1
# /cms is the base URL path to the CMS.
# /var/cms is where index.wsgi and the db directory live.
# /var/www is the path to the static files.
# Adjust these paths to your setup.
WSGIScriptAlias /cms /var/cms/index.wsgi
SetEnv cms.domain
SetEnv cms.cmsBase /var/cms
SetEnv cms.wwwBase /var/www
SetEnv cms.maxPostContentLength 1048576
SetEnv cms.debug 1

WSGIProcessGroup wsgi
AllowOverride None
Options -ExecCGI -MultiViews +SymLinksIfOwnerMatch -Indexes
Require all granted

# Redirect all 404 to the CMS 404 handler (optional)
ErrorDocument 404 /cms/__nopage/__nogroup.html