[python] FastCGI - how ?

 
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI
View previous topic :: View next topic  
Author Message
kukiz
-


Joined: 07 Apr 2006
Posts: 6

PostPosted: Tue Jun 27, 2006 8:46 pm    Post subject: [python] FastCGI - how ? Reply with quote

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.
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Wed Jun 28, 2006 12:39 pm    Post subject: Re: [python] FastCGI - how ? Reply with quote

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):

Code:
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:

Code:
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.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> FastCGI/CGI All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group