httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: problems
Date Mon, 04 Mar 2002 12:28:32 GMT
"Murali K. Vemuri" wrote:
> 
> 
> hi ,
> 
> i wanna add a perl script handler for the apache and i could not
> understand from the help files.
> forgive me, i am a newbie in the 'apache configuration'. can someone
> please suggest me
> how i can do this...
> my intention is to call perl scripts directly.

Two ways:

1) Put all your perl-scripts in one directory (e.g. called "cgi") then
do:

ScriptAlias /cgi /path/to/cgi
<Directory /path/to/cgi>
  Allow from all
</Directory>

now http://your-server/cgi/prog.pl will execute /path/to/cgi/prog.pl


2) Define an extension as executable, e.g.

AddHandler cgi-script cgi

then any program ending in ".cgi" in any directory will get executed.
So;

http://your-server/banana/prog.cgi will execute
/path/to/docroot/banana/prog.cgi

Remember that in either case, the program runs as the user defined by
the "User" directive (i.e. not as the fileowner) and you must generate a
proper CGI header before anything else... Read
http://httpd.apache.org/docs/howto/cgi.html for details.

Rgds,

Owen Boyle.

---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message