Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/

<Directory />    
    Order Deny,Allow
    Allow from all

PerlModule MyModule
<Location />
    SetHandler modperl
    PerlResponseHandler MyModule

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

share|improve this question

migrated from Apr 1 '10 at 23:25

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

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

Option One

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


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

Option Two

Use a rewrite rule

RewriteEngine on
RewriteRule ^$ /somefile
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.