README.rst 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. cms.py - simple WSGI/Python based CMS script
  2. ============================================
  3. Copyright (c) 2011-2019 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. WSGIPythonOptimize 1
  20. # /cms is the base URL path to the CMS.
  21. # /var/cms is where index.wsgi and the db directory live.
  22. # /var/www is the path to the static files.
  23. # Adjust these paths to your setup.
  24. WSGIScriptAlias /cms /var/cms/index.wsgi
  25. SetEnv cms.domain example.com
  26. SetEnv cms.cmsBase /var/cms
  27. SetEnv cms.wwwBase /var/www
  28. SetEnv cms.maxPostContentLength 1048576
  29. SetEnv cms.debug 1
  30. <Directory /var/cms>
  31. WSGIProcessGroup wsgi
  32. AllowOverride None
  33. Options -ExecCGI -MultiViews +SymLinksIfOwnerMatch -Indexes
  34. Require all granted
  35. </Directory>
  36. # Redirect all 404 to the CMS 404 handler (optional)
  37. ErrorDocument 404 /cms/__nopage/__nogroup.html