Configuration
Configure the following in your apache configuration file(s) or in a .htaccess file.
1. configured apache with Listen,VirtualHost,Directory,Files directives # ***************************************************************** # ***************************************************************** # * for MichiPUG pyblosxom presentation Dec 2006 # ***************************************************************** Listen 9000 <VirtualHost *:9000> ServerAdmin sample@example.invalid DocumentRoot /Library/WebServer/michipug-pyblosxom-Dec-2006/ ServerName 127.0.0.1 ErrorLog "/private/var/log/httpd/port-9000-error_log" AddHandler cgi-script .cgi ScriptAlias /cgi-bin/ /Library/WebServer/michipug-pyblosxom-Dec-2006/cgi-bin/ DirectoryIndex cgi-bin/pyblosxom.cgi RewriteEngine On RewriteRule blog$ /cgi-bin/pyblosxom.cgi/ [last] RewriteRule blog(/.*)?$ /cgi-bin/pyblosxom.cgi$1 [last] </VirtualHost> <Directory "/Library/WebServer/michipug-pyblosxom-Dec-2006/"> Options Indexes AllowOverride None Order allow,deny Allow from all </Directory> <Directory "/Library/WebServer/michipug-pyblosxom-Dec-2006/cgi-bin/"> Options ExecCGI AllowOverride None Order allow,deny Allow from all </Directory> <Files config.py> deny from all </Files> # ***************************************************************** # * for MichiPUG pyblosxom presentation Dec 2006 # ***************************************************************** # ***************************************************************** 3. configured pyblosxom by modifying the config.py file $ diff config.py.orig config.py 12c12 < py['blog_title'] = "Another pyblosxom blog" --- > py['blog_title'] = "MichiPUG PyBlosxom Presentation blog" 18c18 < py['blog_author'] = "name" --- > py['blog_author'] = "Jim McDonald" 21c21 < py["blog_email"] = "email@blah.com" --- > py["blog_email"] = "jimc_mcdonald@pobox.com" 33c33 < py["blog_rights"] = "Copyright 2005 Joe Bobb" --- > py["blog_rights"] = "Copyright 2006 Jim McDonald" 36c36 < py['datadir'] = "/path/to/blog" --- > py['datadir'] = "/Library/WebServer/michipug-pyblosxom-Dec-2006/blog/entries" 71a72 > py['flavourdir'] = "/Library/WebServer/michipug-pyblosxom-Dec-2006/blog/flavours" 79c80 < # py['base_url'] = "http://www.some.host/weblog" --- > py['base_url'] = "http://127.0.0.1:9000/blog" 99a101 > py['plugin_dirs'] = ['/usr/local/lib/python2.4/site-packages/contrib.1.3.0/plugins/'] 110a113 > py['load_plugins'] = ["pyfilenamemtime","pycalendar", "pycategories", "pyarchives"] 118a122 > py["static_dir"] = "/Library/WebServer/michipug-pyblosxom-Dec-2006/static" 3. copied the custom html flavour to ./blog/ and modified it to include the correct setting for the stylesheet 4. copied the CSS stylesheet to ./css/
The PyBlosxom Configuration File: config.py
PyBlosxom's configuration file is called config.py, and basically contains a dict named py, whose entries are the configuration variables for PyBlosxom. This dict ends up getting passed all the way through the core processing engine. Some of the important values that you need to set are
py['datadir'] the directory of the root of the PyBlosxom data, which will contain all the blog entries.
py['plugin_dirs'] a list of directories containing the plugins that you wish to use.
py['load_plugins'] a list containing the names of the plugins that you wish to use.
In order to use plugins you need to correctly set py['plugin_dirs'] and place the corresponding entry in py['load_plugins']
You will need to be careful about operating system permissions between the web server user and the user PyBlosxom is running as. This will affect comment files and logs especially.
After these steps are complete the blog is functional.
Note: Normally you'd place your datadir blog entries outside of the root document directory of your web site!
[23:47] | [] | #-permalink-#