On Fri, 27 Jul 2007, Brian Reichert wrote:

> When I spun up my apache/mod_perl installation, before I configured it to
> use Mason, DirectoryIndex was working for me.
> My httpd.conf contains a global setting:
>
>  DirectoryIndex index.html index.html.var
>
> When I then added my Mason configuration:
>
>    PerlRequire /var/www/html/handler.pl
>
>    SetHandler   perl-script
>    PerlSetVar MasonDeclineDirs 0
>    DirectoryIndex index.html
>
>    PerlModule HTML::Mason::ApacheHandler
>    ....
>
> Now, instead of index.html files getting magically served, I get this error:
>
>  [Fri Jul 27 10:52:51 2007] [error] [client 172.20.219.242] Attempt
>  to serve directory: /var/www/html/foo/
>
> I do have a foo/index.html; a request for that does get processed.
>
> Is this the correct behavior?
>
> Do I need to wrangle a dhandler for this?

        I've just been playing with this myself.  You need a dhandler, 
possibly containing:

% $r->uri() =~ m#^/$# and $m->redirect('index.html');

        Basically, the DirectoryIndex stuff never sees it because Mason is 
dealing with it.

        HTH,

        :)


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: [EMAIL PROTECTED] | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- 
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to