How to add a .fcgi on a shared host?

Discussion in 'CGI/Perl/Python' started by CptMath, Mar 19, 2008.

  1. CptMath

    CptMath New Member


    I'm on a shared host running Litespeed. I know that using an .htaccess file on Apache you can easily do AddHandler to configure how the server works with a certain file, but this does not seem to be working. Litespeed does claim to be compatible with .htaccess, but I'm not sure why this isn't working.

    Here's what I have.
    AddHandler fastcgi-script .fcgi
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ mysite.fcgi/$1 [QSA,L]
    It's pretty simple, yet it seems to be 404ing for some reason. I can confirm that the site is accessed fine when I take away the .htaccess file.

    I know there's something to the effect of using a control panel to add CGI apps, but I am not the admin of this server, it is a shared host. If someone could please let me know how to do this, that'd be great.

  2. mistwang

    mistwang LiteSpeed Staff

    LiteSpeed does not support fastcgi handler through Apache configurations, you can have your script run as CGI instead.
  3. CptMath

    CptMath New Member

    Ok, it looks like my host will add an entry for me if I can provide the details, hopefully I can get it right the first time. :)
  4. CptMath

    CptMath New Member

    Ok, so from all the info I've amassed...

    MaxConn: 20
    Auto Start: Yes
    Command: runfcgi daemonize=false
    Instance: 1

    I've also read that I should have them fill in Environment with my PYTHONPATH environment settings, is this correct? In that case, since I'm also using a python installed in my home directory, should I also specify path settings that lead to my python?

    As far as context, I guess I need to also provide them details about that for my VHOST.

    Hopefully I can get this figured out quickly, this isn't really what I'd like to be doing... would rather be coding.
  5. mistwang

    mistwang LiteSpeed Staff

    Yes, you need to set all environment variable required for the app.
    Your should point to your copy of python installation with #!...
    Yes, you need to have a fcgi context for your vhost.

    You can install LSWS standard in you local development machine to try it out.
  6. mistwang

    mistwang LiteSpeed Staff

    Also add a useless environment "LSAPI_CHILDREN=20" to make LSWS happy with the "MaxConn" and "Instance" combination.
  7. Aninnaskiny

    Aninnaskiny New Member

    How to add a fcgi on a shared host

    Thanks andreymi,

    But, I need to know how to associate a new texture to the world object:

    w = World.GetCurrent

    tex = Texture.Newmytex
    tex.image = img

    #now, how can I put this texture to be the background of my scene?

Share This Page