FCGI config
TuxPirate <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.devel |
|---|---|
| Message-ID | <[email protected]> |
For what it's worth.. or... Since it's missing from the install docs, here
is a functional pyblosxom install using wsgi through fastcgi + lighttpd:
--- lighttpd config ---
## FastCGI programs have the same functionality as CGI programs,
## but are considerably faster through lower interpreter startup
## time and socketed communication
##
## Documentation: /usr/share/doc/lighttpd-doc/fastcgi.txt.gz
## http://www.lighttpd.net/documentation/fastcgi.html
server.modules += ( "mod_fastcgi" )
fastcgi.server = (
"/MyBlog" => ( "pyblosxom" => (
"socket" => "/tmp/pyblosxom-fcgi.sock",
"check-local" => "disable"
) )
)
--- snip ---
--- pyblosxom.fcgi ---
#!/usr/bin/env python
import sys
from flup.server.fcgi import WSGIServer
from wsgi_app import application
server = WSGIServer(application,
bindAddress='/tmp/pyblosxom-fcgi.sock',
maxSpare=2)
ret = server.run()
sys.exit(ret)
--- snip ---
--- wsgi_app.py aka pyblosxom.wsgi ---
# This is the pyblosxom.wsgi script that powers the _______ blog.
import sys
def add_to_path(d):
if d not in sys.path:
sys.path.insert(0, d)
# call add_to_path with the directory that your config.py lives in.
add_to_path("/home/joe/blog")
# if you have PyBlosxom installed in a directory and NOT as a Python
# library, then call add_to_path with the directory that PyBlosxom
# lives in. For example, if I untar'd pyblosxom-1.4.1.tar.gz into
# /home/joe/, then add like this:
# add_to_path("/home/joe/pyblosxom-1.4.1/")
import Pyblosxom.pyblosxom
application = Pyblosxom.pyblosxom.PyBlosxomWSGIApp()
--- snip ---
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Pyblosxom-devel mailing list
Pyblosxom-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/pyblosxom-devel