[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modperl
Subject:    Re: Prob with configuring CGI.
From:       Owen Boyle <obo () bourse ! ch>
Date:       2001-03-29 8:21:47
[Download RAW message or body]

Vikram Hari Deshmukh wrote:
> 
> Well I have started with CGI, 2 days back. But some aspects makes me confused.
> I am having Apache server over Redhat linux 6.2.

I'm a bit confused too... You mention CGI but you posted to a mod_perl
list. Are you using mod_perl? 

To run plain old CGI programs (using an external perl interpreter), all
you need is:

<Directory /home/httpd/cgi-bin>
  Allow from all
</Directory>
Options +ExecCGI
ScriptAlias /cgi /home/httpd/cgi-bin

call it with http://my_domain/cgi/my_prog

To run CGIs under mod_perl (using the mod_perl interpreter), with
one-shot persistence (i.e. script executes then exits) use
Apache::PerlRun;  

<Directory /home/httpd/perl-run>
    Allow from all
</Directory>
Alias /perl-run/  /home/httpd/perl-run/
<Location /perl-run>
  SetHandler  perl-script
  PerlHandler Apache::PerlRun
  Options +ExecCGI
</Location>

call it with http://my_domain/perl-run/my_prog

To run CGIs under mod_perl but with persistence (i.e. the interpreter
stays loaded and global variables remain set) use Apache::Registry;  

<Directory /home/httpd/perl>
    Allow from all
</Directory>
Alias /perl/  /home/httpd/perl/
<Location /perl>
  SetHandler  perl-script
  PerlHandler Apache::Registry
  Options +ExecCGI
</Location>

call it with http://my_domain/perl/my_prog

You can also write your own handlers in mod_perl but that's quite a way
from CGI - I don't think that's what you're trying to do...

Rgds,

Owen Boyle.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic