FastCGI on shared host

Discussion in 'CGI/Perl/Python' started by lotusone, Apr 16, 2009.

  1. lotusone

    lotusone New Member

    Thanks for the forum!

    I want to run a FastCGI app on my shared host.

    The host informed me that they do not have vhosts set up through litespeed via the admin console i.e. they have no "Virtual Host" tab, thus no "Context" tab to set a directory wide handler for the app. They also have only a server-level "External App" tab.

    So here's the problem:
    When they set up the external app server-wide, it runs under litespeed's UID. Thus, whenever it runs afoul, I can't kill the processes or otherwise regain control. I also have to increase the permissions on all the files the app needs.

    The questions:
    1. Is there a way to get the app to run under my uid without resorting to the vhost->(External App & Context) settings?
    2. How could those vhost tabs not exist in a litespeed setup? Is this a common way to use litespeed with virtual hosts?
    3. Is there a way (like .htaccess) to map a server-wide external app to a directory e.g. www.mysite.com/ instead of to an extension via "Script handler" tab?

    Sean DeNigris
  2. mistwang

    mistwang LiteSpeed Staff

    It is not possible now unless they configure your vhost natively with LSWS console.

    We will add support for Apache mod_fastcgi directives in our 4.0.2 release.
  3. lotusone

    lotusone New Member

    Thanks for the prompt reply! Which is not possible: running the External app under a different uid, setting a per-directory handler, or both?

    Awesome! Thanks :)
  4. mistwang

    mistwang LiteSpeed Staff

    You can set it as per-directory handler by using "DefaultType" or "ForceType" instead of "AddType" directive. But, use it for "/" will cause trouble I think, unless you do not need to have the server serve any static content.
  5. lotusone

    lotusone New Member

    Ok, it's working well enough - I'll just leave it alone :)

    About the running FastCGI apps under the requester's uid... will that be part of the 4.0.2 directive implementation? i.e. FastCgiWrapper?
  6. mistwang

    mistwang LiteSpeed Staff

    We add SuEXEC user/group for external app configured at server level. So, you can have your provider to use your user/group for the FastCGI application added for you.

    We did not add support for Apache mod_fastcgi directives, so it may break other things.

Share This Page