kilo_bytes has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to use mod_rewrite where i already use mod_perl and it is not working.

I do run scripts in the Apache document root and have this in Apache config for every script to make them run on mod_perl:

<Files "random.cgi"> SetHandler perl-script PerlHandler ModPerl::PerlRunPrefork Options ExecCGI PerlSendHeader On allow from all </files>

My scripts do work normally on my web root dir but if i set 'RewriteRule on' in my root dir the scripts don't work anymore, they give a 403 forbidden error and Apache log complain about FollowSymLinks being OFF, but it is not OFF. Scripts not running on mod_perl and everything else keep working normally regardless of the mod_rewrite being ON. So i conclude it has something to do with mod_perl.

Replies are listed 'Best First'.
Re: mod_perl + mod_rewrite
by kcott (Archbishop) on Jun 18, 2015 at 04:52 UTC

    G'day kilo_bytes,

    Welcome to the Monastery.

    "... Apache log complain about FollowSymLinks being OFF, but it is not OFF."

    Without seeing more of your config, this is just a guess; however, I suspect the problem may be here:

    Options ExecCGI

    This sets absolute options instead of adding to the options you already have. If this is the case, you can probably fix this with the addition of a '+':

    Options +ExecCGI

    See Apache Options Directive for more details.

    -- Ken

      Thanks for your wisdom, after two days of trials and asking around the simple plus sign made it work.