README 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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
  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. WSGIPythonPath /var/cms
  23. SetEnv cms.domain example.com
  24. SetEnv cms.cmsBase /var/cms
  25. SetEnv cms.wwwBase /var/www
  26. SetEnv cms.debug 1
  27. <Directory /var/cms>
  28. WSGIProcessGroup wsgi
  29. AllowOverride None
  30. Options -ExecCGI -MultiViews +SymLinksIfOwnerMatch -Indexes
  31. Order deny,allow
  32. Allow from all
  33. </Directory>
  34. # Redirect all 404 to the CMS 404 handler (optional)
  35. ErrorDocument 404 /cms/__nopage/__nogroup.html
  36. Reload Apache httpd after modifying the config.