?
Solved

apache config file and mod_perl

Posted on 2006-03-19
3
Medium Priority
?
178 Views
Last Modified: 2010-03-05
Hi Experts,

Is there a way to have mod_perl installed on a server, and using it for perl scripts in your "Apache2/modperl" directory, but to have another directory, say just "Apache2/perl", that will run perl but not mod_perl?  Would this be done in the Apache config file, and if so, how?

Thanks,
kesea
0
Comment
Question by:kesea
1 Comment
 
LVL 2

Accepted Solution

by:
alexsergeyev earned 2000 total points
ID: 16232910
You should set rules for your perl scripts to be run under mod_perl:

SetHandler          perl-script
PerlHandler         Apache::Registry  # (or another perl-handler)

For all other scripts that should be run through perl-interpretator, as single CGI files use:

SetHandler              cgi-script

You can use those directives in <Directory> blocks, or in <Location>, <Files> sections... You also can use inside of particular .htaccess file.

To map different handlers by-extension it's useful to write "AddHandler" directives:
AddHandler              cgi-script      .cgi
AddHandler              perl-script      .pl

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question