Pixel Pedals of Tomakomai

北海道苫小牧市出身の初老の日常

FastCGIでTurboGearsってどう動かすの?

使い潰す前からゴールばっかみてアレですけど、気になったので調べました。


まず、ここ

The CherryPy folks list this setup as their preferred setup for CherryPy and their wiki has extensive instructions on how to run the CherryPy server (and TurboGears by extension) behind Apache with Apache acting as a proxy.

CherryPy側のドキュメント読めとのことなので、次はここ。だけど、なんか導入されたCherryPyは2.2系っぽいので、

from cherrypy._cpwsgi import wsgiApp

なんか、_cpwsgiが裏っぽくてやですねー。こっちに解説が。

CherryPy 2.2 didn't have an Application object, and cherrypy.tree wasn't callable as a WSGI application, either. Instead, there was a single cherrypy._cpwsgi.wsgiApp function which did what the Tree does now (CherryPy apps only; not other WSGI apps or middleware).

CherryPyの新しいバージョンだと、もっと自然な書き方ができるみたいです。でも、TurboGears2はPylons使ってるってのもちらほら見かけるので、どうするのが定石なんでしょうかねえ?