Project home: https://bues.ch Original repository at: https://git.bues.ch/git/cms.git https://bues.ch

Michael Buesch 82dc1f1615 Remove deprecated datetime.utcnow hai 11 meses
cms 82dc1f1615 Remove deprecated datetime.utcnow hai 11 meses
example b5400d2591 Update css hai 1 ano
submodules da4d696699 Update submodule 'multipart' hai 1 ano
.gitignore 94df127121 .gitignore: Add __pycache__ %!s(int64=5) %!d(string=hai) anos
.gitmodules 9b65e4fc50 Remove usage of cgi module %!s(int64=2) %!d(string=hai) anos
README.rst dbc7b5236a Print message, if cython module fails to load %!s(int64=3) %!d(string=hai) anos
TODO a4e0639a7f Remove header todo entry %!s(int64=5) %!d(string=hai) anos
build.sh 9a032e1ae2 build: Fix cython link for Python 3.10 %!s(int64=2) %!d(string=hai) anos
cleantree.sh 9a032e1ae2 build: Fix cython link for Python 3.10 %!s(int64=2) %!d(string=hai) anos
cms-cli 0bdfc96499 Change mime types to xhtml hai 1 ano
index.wsgi dbc7b5236a Print message, if cython module fails to load %!s(int64=3) %!d(string=hai) anos
setup.py eb4acdd438 Use setuptools %!s(int64=2) %!d(string=hai) anos
setup_cython.py 7ea91af783 Remove Cython3 support %!s(int64=4) %!d(string=hai) anos

README.rst

cms.py - simple WSGI/Python based CMS script
============================================

Copyright (c) 2011-2021 Michael Buesch


Installing
==========

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
WSGIApplicationGroup %{GLOBAL}
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 example.com
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