I have an Apache server set up to use mod_perl. I have it set up to handle all requests using a Perl module MyModule. Here is part of my httpd.conf:

LoadModule perl_module modules/mod_perl.so

<Directory />    
    Order Deny,Allow
    Allow from all
</Directory>

PerlModule MyModule
<Location />
    SetHandler modperl
    PerlResponseHandler MyModule
</Location>

This seems to work fine, except top level directory (ie. www.mysite.com/) is not being sent to MyModule. What's going wrong?

link|improve this question
Why all the close votes? – DVK Apr 1 '10 at 23:03
2  
Please provide the full configuration. I suspect that another configuration is changing the behaviour for /. – jneves May 4 '10 at 11:42
feedback

migrated from stackoverflow.com Apr 1 '10 at 23:25

This question came from our site for professional and enthusiast programmers.

1 Answer

Option One

Specify a DirectoryIndex which (a) is valid, and (b) is processed via mod_perl.

DirectoryIndex index.pl

# This part probably isn't necessary, but might help.
<Files *.pl>
  SetHandler modperl
  PerlResponseHandler MyHandler
</Files>

Option Two

Use a rewrite rule

RewriteEngine on
RewriteRule ^$ /somefile
link|improve this answer
feedback

Your Answer

 
or
required, but never shown