kukiz wrote
Hi
I would like to use python as FASTCGI. I have found
IT and I have installed in python.
I have problem. :(
How configure AWS with
FLUP and how use it.
Help please.
Flup seems to work only with WSGI python applications (not any .py file).
Here is a little example of use (not tested):
* Install Python (ActivePython is a good distribution)
* Install Flup as explained in its documentation.
* Copy this inside a file test.py (it can be anywhere in your hard drive, not even inside your web site directory):
def myapp(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
return ['Hello World!\n']
if __name__ == '__main__':
from flup.server.fcgi import WSGIServer
WSGIServer(myapp).run()
* Declare a new interpreter which interface is FastCGI (Pipes or TCP/IP), which executable is Python, and which arguments are:
C:\path\to\test.py
Associate this interpreter with an extension of your choice (for example .www).
* Validate
* Create in your web site directory a file dummy.www (it could be empty).
* Now browse
http://www.yoursite/dummy.www
* This will trigger the Python application and start it. The file contents of dummy.www are not used in this example. It is only there to trigger the FastCGI process.