Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

mod-perl (mason) breaks DirectoryIndex apache2

by 3duke (Initiate)
on Sep 21, 2013 at 15:02 UTC ( #1055133=perlquestion: print w/replies, xml ) Need Help??
3duke has asked for the wisdom of the Perl Monks concerning the following question:

On a new install of Debian GNU/Linux version 7 (wheezy), after installing apache and mod-perl I am able to use mason, but the SetHandler/PerlHandler directives appear to make the DirectoryIndex directive stop working. Below are the steps needed to recreate with a fresh Wheezy install.

aptitude install apache2 libhtml-mason-perl libmason-perl

at this point traveling to the server via http should give you the 'It Works Page', and you'll be able to test that DirectoryIndex is working and sending the user to index.html. Add these lines to the default sites-enabled virtual host configuration:

PerlModule HTML::Mason::ApacheHandler <VirtualHost *:80> ServerAdmin webmaster@localhost <Location /var/www/> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler </Location>

restart apache and now it will parse <% $mason %> on your index, but you will have to travel explicitly to the index (i.e. because it will no longer direct you to it automatically.

Thanks in advance for any help with this issue, and my apologies if its far simpler than I thought, or I have somehow not met the standards for a post (I read the rules, but you never can be sure). I have the mason book and have read online documentation, but was unable to find documentation related to apache configuration with mason.

Replies are listed 'Best First'.
Re: mod-perl (mason) breaks DirectoryIndex apache2
by Anonymous Monk on Sep 21, 2013 at 16:50 UTC

      dhandlers were the important factor here, once I read through the dhandler section of the mason book again and on the fourth link there, I was able to get back on track. Thank you.

        ...Thank you.

        :) So what was the issue and the solution?

        The subdir didn't exist so dhandler wasn't called, so you added a location for subdir in your apache config, so dhandler would get called?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1055133]
Approved by ww
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2018-06-19 10:50 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (113 votes). Check out past polls.