LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   CGI/Perl/Python (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=22)
-   -   How to add a .fcgi on a shared host? (http://www.litespeedtech.com/support/forum/showthread.php?t=1882)

CptMath 03-19-2008 02:17 PM

How to add a .fcgi on a shared host?
 
Hi,

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

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.

Thanks,
CptMath

mistwang 03-19-2008 02:22 PM

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

CptMath 03-19-2008 07:22 PM

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

CptMath 03-20-2008 06:04 AM

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

MaxConn: 20
Auto Start: Yes
Command: my_manage.py 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.

mistwang 03-20-2008 11:09 AM

Yes, you need to set all environment variable required for the app.
Your my_manage.py 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.

mistwang 03-20-2008 11:10 AM

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

Aninnaskiny 12-20-2009 05:31 AM

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.setTypeImage
img=Image.Loadmyimage.jpg
tex.image = img

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


All times are GMT -7. The time now is 10:27 AM.