README 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. -------------------------------------------------------------------------------
  2. --- cms.py - simple WSGI/Python based CMS script
  3. --- Copyright (c) 2011-2012 Michael Buesch <m@bues.ch>
  4. ---------
  5. --- Installing cms.py ---
  6. Just run
  7. make install-world DESTDIR=/var/cms OWNER=www-data GROUP=www-data
  8. to install the cms scripts and the example database files.
  9. See "make help" for more options.
  10. --- Configuring Apache httpd ---
  11. Install the Apache WSGI module. On Debian Linux, this is libapache2-mod-wsgi.
  12. Create a new config file /etc/apache2/conf.d/wsgi with content similar to
  13. the following Debian based example:
  14. # Adjust "user" and "group" to your system.
  15. WSGIDaemonProcess wsgi processes=10 threads=1 display-name=apache-wsgi user=www-data group=www-data python-path=/var/cms
  16. WSGIPythonOptimize 1
  17. # /cms is the base URL path to the CMS.
  18. # /var/cms is where index.wsgi, cms.py and the db directory live.
  19. # /var/www is the path to the static files.
  20. # Adjust these paths to your setup.
  21. WSGIScriptAlias /cms /var/cms/index.wsgi
  22. SetEnv cms.domain example.com
  23. SetEnv cms.cmsBase /var/cms
  24. SetEnv cms.wwwBase /var/www
  25. SetEnv cms.maxPostContentLength 1048576
  26. SetEnv cms.debug 1
  27. <Directory /var/cms>
  28. WSGIProcessGroup wsgi
  29. AllowOverride None
  30. Options -ExecCGI -MultiViews +SymLinksIfOwnerMatch -Indexes
  31. Require all granted
  32. </Directory>
  33. # Redirect all 404 to the CMS 404 handler (optional)
  34. ErrorDocument 404 /cms/__nopage/__nogroup.html
  35. Reload Apache httpd after modifying the config.