README.rst 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. cms.py - simple WSGI/Python based CMS script
  2. ============================================
  3. Copyright (c) 2011-2021 Michael Buesch <m@bues.ch>
  4. Installing
  5. ==========
  6. Just clone the cms.git repository to some directory where apache has access to.
  7. In the configuration example below the directory will be ``/var/cms``
  8. Then create the database directory named ``db`` inside of the cloned directory.
  9. You may start with the example db:
  10. ``cp -r /var/cms/example/db /var/cms/``
  11. Configuring Apache httpd
  12. ========================
  13. Install the Apache WSGI module. On Debian Linux, this is libapache2-mod-wsgi-py3.
  14. Create a new config file /etc/apache2/conf.d/wsgi with content similar to
  15. the following Debian based example:
  16. .. code::
  17. # Adjust "user" and "group" to your system.
  18. WSGIDaemonProcess wsgi processes=10 threads=1 display-name=apache-wsgi user=www-data group=www-data python-path=/var/cms
  19. WSGIApplicationGroup %{GLOBAL}
  20. WSGIPythonOptimize 1
  21. # /cms is the base URL path to the CMS.
  22. # /var/cms is where index.wsgi and the db directory live.
  23. # /var/www is the path to the static files.
  24. # Adjust these paths to your setup.
  25. WSGIScriptAlias /cms /var/cms/index.wsgi
  26. SetEnv cms.domain example.com
  27. SetEnv cms.cmsBase /var/cms
  28. SetEnv cms.wwwBase /var/www
  29. SetEnv cms.maxPostContentLength 1048576
  30. SetEnv cms.debug 1
  31. <Directory /var/cms>
  32. WSGIProcessGroup wsgi
  33. AllowOverride None
  34. Options -ExecCGI -MultiViews +SymLinksIfOwnerMatch -Indexes
  35. Require all granted
  36. </Directory>
  37. # Redirect all 404 to the CMS 404 handler (optional)
  38. ErrorDocument 404 /cms/__nopage/__nogroup.html