You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Morse, Richard E.MGH" <RE...@PARTNERS.ORG> on 2012/02/24 16:16:05 UTC

[users@httpd] Help with mod_fcgid 2.2

Hi! I'm trying to get a PSGI app running under Apache. Because I don't actually manage the box it's running on, it is complicated for me to get an additional service set up to start when the machine starts, so (unless there is some way to trigger it via Apache), I can't use the reverse proxy mechanism.

I have discovered that there is mod_fcgid 2.2 available (it's a CentOS 5 box, so there doesn't appear to be a 2.3 version available), but I'm confused by the almost non-existant documentation that is provided.

What I would like is to set fcgid up so that any request made to

	/provider/

(ie, /provider/foo, /provider/, /provider/images/foo.jpg, etc.) will get passed to the file "app.psgi" located in a particular directory.

Does anyone know how I can get this configured? I've tried playing around with FCGIWrapper, but I can't figure out what I'm missing...

Thanks,
Ricky


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Help with mod_fcgid 2.2

Posted by Jeff Trawick <tr...@gmail.com>.
On Fri, Feb 24, 2012 at 11:22 AM, Morse, Richard E.MGH
<RE...@partners.org> wrote:
> On Feb 24, 2012, at 10:30 AM, Jeff Trawick wrote:
>
>> I'd be lying if I said that moving to 2.3.x would magically solve all
>> your problems, but it is better documented and various folks that hang
>> out on this list are familiar with it.
>>
>> http://httpd.apache.org/mod_fcgid/
>> http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
>
> Ideally, I would move to 2.3.x. But there is no package available for it for this OS (as I said, I don't manage the box), so I would have to compile it myself, and as there *is* a mod_fcgid package installed, I would be competing with the package management system, and am likely to have my module overwritten...
>
> If I can't get anything to work otherwise, I will probably go this route, but it's my last choice...
>
>> Untested, but try this type of configuration:
>>
>> <Location /myapp/>
>> SetHandler prettify
>> Action prettify /tools/prettify.pl
>> </Location>
>>
>> <Directory /www/tools/>
>> Options +ExecCGI
>> SetHandler fcgid-script
>> </Directory>
>
> I think I must be missing something here.
>
> I have the following layout
>
>        /var/www/html
>                - docs  [the document root]
>                - provider [ the psgi app I'm trying to run]
>
> I then have an alias statement
>
>        Alias /provider /var/www/html/provider
>
> If I do
>
>        AddHandler fcgid-script psgi
>        <Location "/provider">
>                SetHandler provider-app
>                Action provider-app "/provider/app.psgi" virtual
>        </Location>
>
> I get an error about recursion.
>
> If I change the location to <Location "/provider2">, I get a 404 page not found.
>
> If I add the stanza
>
>        <Directory "/var/www/html/provider">
>                Options +ExecCGI
>                SetHandler fcgid-script
>        </Directory>
>
> this doesn't seem to change anything.
>
> I'm not sure what I should be doing? I think there's some basic issue with Alias/Action/AddHandler/SetHandler that I'm missing, and the documentation doesn't seem to be helping.

I think the big issue is that in the location with the documents (to
be processed by the FastCGI app) you want the handler to be something
defined by Action, and for the script itself you want the handler to
be fcgid-script.

Possibly I can try out a better matching example later today or
tomorrow if that doesn't help.


>
> Ricky
>
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>



-- 
Born in Roswell... married an alien...

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Help with mod_fcgid 2.2

Posted by "Morse, Richard E.MGH" <RE...@PARTNERS.ORG>.
On Feb 24, 2012, at 10:30 AM, Jeff Trawick wrote:

> I'd be lying if I said that moving to 2.3.x would magically solve all
> your problems, but it is better documented and various folks that hang
> out on this list are familiar with it.
> 
> http://httpd.apache.org/mod_fcgid/
> http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

Ideally, I would move to 2.3.x. But there is no package available for it for this OS (as I said, I don't manage the box), so I would have to compile it myself, and as there *is* a mod_fcgid package installed, I would be competing with the package management system, and am likely to have my module overwritten...

If I can't get anything to work otherwise, I will probably go this route, but it's my last choice...

> Untested, but try this type of configuration:
> 
> <Location /myapp/>
> SetHandler prettify
> Action prettify /tools/prettify.pl
> </Location>
> 
> <Directory /www/tools/>
> Options +ExecCGI
> SetHandler fcgid-script
> </Directory>

I think I must be missing something here.

I have the following layout

	/var/www/html
		- docs  [the document root]
		- provider [ the psgi app I'm trying to run]

I then have an alias statement

	Alias /provider /var/www/html/provider

If I do

	AddHandler fcgid-script psgi
	<Location "/provider">
		SetHandler provider-app
		Action provider-app "/provider/app.psgi" virtual
	</Location>

I get an error about recursion.

If I change the location to <Location "/provider2">, I get a 404 page not found.

If I add the stanza

	<Directory "/var/www/html/provider">
		Options +ExecCGI
		SetHandler fcgid-script
	</Directory>

this doesn't seem to change anything.

I'm not sure what I should be doing? I think there's some basic issue with Alias/Action/AddHandler/SetHandler that I'm missing, and the documentation doesn't seem to be helping.

Ricky



The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Help with mod_fcgid 2.2

Posted by Jeff Trawick <tr...@gmail.com>.
On Fri, Feb 24, 2012 at 10:16 AM, Morse, Richard E.MGH
<RE...@partners.org> wrote:
> Hi! I'm trying to get a PSGI app running under Apache. Because I don't actually manage the box it's running on, it is complicated for me to get an additional service set up to start when the machine starts, so (unless there is some way to trigger it via Apache), I can't use the reverse proxy mechanism.
>
> I have discovered that there is mod_fcgid 2.2 available (it's a CentOS 5 box, so there doesn't appear to be a 2.3 version available), but I'm confused by the almost non-existant documentation that is provided.

I'd be lying if I said that moving to 2.3.x would magically solve all
your problems, but it is better documented and various folks that hang
out on this list are familiar with it.

http://httpd.apache.org/mod_fcgid/
http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html

>
> What I would like is to set fcgid up so that any request made to
>
>        /provider/
>
> (ie, /provider/foo, /provider/, /provider/images/foo.jpg, etc.) will get passed to the file "app.psgi" located in a particular directory.

Untested, but try this type of configuration:

<Location /myapp/>
SetHandler prettify
Action prettify /tools/prettify.pl
</Location>

<Directory /www/tools/>
Options +ExecCGI
SetHandler fcgid-script
</Directory>
>
> Does anyone know how I can get this configured? I've tried playing around with FCGIWrapper, but I can't figure out what I'm missing...
>
> Thanks,
> Ricky
>
>
> The information in this e-mail is intended only for the person to whom it is
> addressed. If you believe this e-mail was sent to you in error and the e-mail
> contains patient information, please contact the Partners Compliance HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in error
> but does not contain patient information, please contact the sender and properly
> dispose of the e-mail.
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>



-- 
Born in Roswell... married an alien...

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org