apache config file and mod_perl

Posted on 2006-03-19
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?

Question by:kesea
    1 Comment
    LVL 2

    Accepted Solution

    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


    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
    There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
    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…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now