FastCGI is a language independent, scalable, open extension to CGI that provides high performance without the limitations of server specific APIs.
$ wget -P ~/local/lib/python2.4/site-packages http://alldunn.com/python/fcgi.py
#!/usr/local/bin/python -S
# coding:UTF-8
import cgitb; cgitb.enable()
import sys; sys.setdefaultencoding('UTF-8')
import site; site.addsitedir('/virtual/xxx/local/lib/python2.4/site-packages')
def myapp(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
return ['Hello World!\n']
if __name__ == '__main__':
from fcgi import WSGIServer
WSGIServer(myapp).run()
DirectoryIndex dispatch.fcgi
AddHandler fastcgi-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-D
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ /dispatch.fcgi/$1 [QSA,L]
http://hain.jp/htsrv/trackback.php/194
No Comments/Trackbacks for this post yet...
極論istの技術屋を始めて早幾年。 流れの速い業界の波にもまれながらも精一杯生きている様をとくとごらんあれ。