Thread: [Pas-dev] comingling cgi's with psp's
Status: Beta
Brought to you by:
mortis
From: Mental <Me...@Ne...> - 2002-03-04 21:38:33
|
Hey. This is just an FYI, but when you setup pas with the following method: PerlInitHandler Apache::StatINC PerlSetEnv PAS_BASE "/usr/local/httpd/" PerlRequire /usr/local/httpd/src/startup.pl <Location /> SetHandler perl-script PerlHandler Org::Bgw::Pas::RequestHandler </Location> It kind of breaks other handlers you have for cgi's/whatnot. What I've done, and what may save others a few minutes on apache.org's site, is setup my environment to allow psp's and cgi's to coexist. In the DocumentRoot's Directory section of your httpd.conf do this: <Directory "/usr/local/httpd/htdocs"> Options Indexes -FollowSymLinks +Includes MultiViews +ExecCGI AllowOverride None Order allow,deny Allow from all <Files *.psp> SetHandler perl-script PerlHandler Org::Bgw::Pas::RequestHandler </Files> </Directory> This way your aliases like /server-info and /perl-status will continue to be handled by their appropriate Handlers. Just a quick tip. I'll update the docs in cvs later tonight. -- Mental (Me...@Ne...) There was a power outage at a department store yesterday. Twenty people were trapped on the escalators. --Steven Wright GPG public key: http://www.neverlight.com/Mental.asc |
From: Kyle R . B. <mo...@vo...> - 2002-03-04 22:05:25
|
I'd also like to point out that you're setting up the Pas Request Handler to handle your document root. Of course even if you choose a path to be handled by Pas, you could still use your type of configuration to allow .cgi's and .psp's to comingle in the same directory structure. I'm curious - how does the configuration you've detailed affect registered URIs for Page objects? If I understand the configuration correctly, then the Pas Request Handler is only invoked for *.psp requests, and not for bare URIs (which is how the registered Page objects work). Is there a way to configure the pas request handler for everything, and then set up *.cgi to be handled by the normal cgi handler? Kyle > Hey. This is just an FYI, but when you setup pas with the following > method: > > PerlInitHandler Apache::StatINC > PerlSetEnv PAS_BASE "/usr/local/httpd/" > PerlRequire /usr/local/httpd/src/startup.pl > <Location /> > SetHandler perl-script > PerlHandler Org::Bgw::Pas::RequestHandler > </Location> > > It kind of breaks other handlers you have for cgi's/whatnot. > > What I've done, and what may save others a few minutes on apache.org's > site, is setup my environment to allow psp's and cgi's to coexist. > > In the DocumentRoot's Directory section of your httpd.conf do this: > > <Directory "/usr/local/httpd/htdocs"> > Options Indexes -FollowSymLinks +Includes MultiViews +ExecCGI > AllowOverride None > Order allow,deny > Allow from all > <Files *.psp> > SetHandler perl-script > PerlHandler Org::Bgw::Pas::RequestHandler > </Files> > </Directory> > > This way your aliases like /server-info and /perl-status will continue to > be handled by their appropriate Handlers. > > Just a quick tip. I'll update the docs in cvs later tonight. > > -- > Mental (Me...@Ne...) > > There was a power outage at a department store yesterday. > Twenty people were trapped on the escalators. > --Steven Wright > > GPG public key: http://www.neverlight.com/Mental.asc > > > > _______________________________________________ > Pas-dev mailing list > Pa...@li... > https://lists.sourceforge.net/lists/listinfo/pas-dev -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Kyle R . B. <mo...@vo...> - 2002-03-05 18:02:02
|
One other point. I think the way the Pas mod_perl Request Handler is set up, it should return DECLINED unless it thinks it's supposed to handle the request (i.e. if it's either a registered URI or a psp page). What that means is that for any other file type, Apache should be applying it's usual rules to. So CGIs should get executed if +ExecCGI is set and .cgi is registered to be handled correctly. Another possibility is to use stacked handlers - specify something like: <Location /pas/> SetHandler perl-script PerlHandler Org::Bgw::Pas::RequestHandler Apache::PerlRun </Location> I think if you do that, Apache will keep calling handlers until one of them returns OK, or all of them have been called. Kyle -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |
From: Kyle R . B. <mo...@vo...> - 2002-03-05 18:19:50
|
> That doesnt happen. CGI's get served as text. Ok, then it doesn't work ;^) > > Another possibility is to use stacked handlers - specify something like: > > > > <Location /pas/> > > SetHandler perl-script > > PerlHandler Org::Bgw::Pas::RequestHandler Apache::PerlRun > > </Location> > > > > I think if you do that, Apache will keep calling handlers until one > > of them returns OK, or all of them have been called. > > > > I'm trying that tonight. I think that should work. > What I want ot be able to do is have psp's comingled iwth everything. I > was planing on making /pas/ the uri start for all registred page objects. That's probably a good approach and should work just fine. The only isuse I can see cropping up is with forward_request(). > So I was gonna have a > <Files *.psp> section in my docroot direcotry. And a <Location>PerlHandler > sction for /pas/. I think it should do what I want. Yeah, I like that approach. Kyle -- ------------------------------------------------------------------------------ Wisdom and Compassion are inseparable. -- Christmas Humphreys mo...@vo... http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ |