[FASTCGI] fastCGI for python

BelStudent@gmail.com belstudent at gmail.com
Fri Jun 11 12:58:12 EDT 2010


There is a version script under mod_apache, I need to remake under FastCGI, but could not get to make a "single window" for fastcgi, but works well for mod_python.
Code mod_python:
<VirtualHost z.world.com:80>
    DocumentRoot "/var/www/z
    ServerName z.world.com:80
    <Directory "/var/www/z">
        AddDefaultCharset utf-8
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from all

        SetHandler mod_python
        PythonHandler util.publisher
        PythonDebug on
        PythonPath "sys.path + ['/var/www/z']"
        PythonOption basedir "/var/www/z"
        PythonOption baseurl "/"
        PythonAutoReload on
        PythonOption mod_python.session.session_type "FileSession"
        PythonOption mod_python.file_session.database_directory "/var/www/z/run/sessions"
    </Directory>     
</VirtualHost>

--------------------------
My attempt to do for FastCGI:
<VirtualHost z2.world.com:80>
ServerAdmin a at b.c
DocumentRoot /var/www/z2
ServerName z2.world.com:80
ErrorLog /var/www/log/error.log
    #<Files app.py>
    #    SetHandler fastcgi-script
    #</Files>
        
    <Directory />
        Options FollowSymLinks +ExecCGI
        AllowOverride All
        SetHandler fastcgi-script
        PythonHandler util.publisher
        PythonDebug on

    </Directory>    
</VirtualHost>

p.s.
If I uncomment the next block:

 #<Files app.py>
    #    SetHandler fastcgi-script
    #</Files>

 then this script will work, that says that FastCGI is working, but I
 can not set up everything to be like mod_python  ("single window")

 p.p.s
 FastCGI installed according to this article:
 http://www.electricmonk.nl/docs/apache_fastcgi_python/apache_fastcgi_python.html#_setup_a_fastcgi_script



More information about the FastCGI-developers mailing list