Hi,

here the solution for my problem:

http://search.cpan.org/~jswartz/HTML-Mason-1.50/lib/HTML/Mason/Admin.pod#Allowing_Directory_Requests

Allowing Directory Requests

By default Mason will decline requests for directories, leaving Apache
to serve up a directory index or a FORBIDDEN as appropriate.
Unfortunately this rule applies even if there is a dhandler in the
directory: /foo/bar/dhandler does not get a chance to handle a request
for /foo/bar/.

If you would like Mason to handle directory requests, set decline_dirs
to 0. The dhandler that catches a directory request is responsible for
setting a reasonable content type via $r->content_type().

My apache configuration looks now like this:

   <LocationMatch /api>
        PerlSetVar MasonDeclineDirs 0
        SetHandler perl-script
        PerlHandler HTML::Mason::ApacheHandler
   </LocationMatch>

And the world is ok again ;-)

Cheers
Pavel



Am Dienstag, den 04.12.2012, 14:39 +0100 schrieb Pavel Cina:
> Hi,
> 
> I have got here following situation: 
> 
> dhandler in /api
> 
> If I call /api/something_what_doesnt_exist then my dhandler gets called.
> If I call only /api/ then responses apache server with "404 Not found"
> and in /var/log/apache2/error_log appears message: 
> "Attempt to serve directory: /srv/www/htdocs/api/"
> 
> My question: Have to tell apache2 that in that case dhandler should be
> called?
> 
> My apache (on sles 11) configuration for /api:
> 
>     <Location /api>
>         SetHandler perl-script
>         PerlHandler HTML::Mason::ApacheHandler
>     </Location>
> 
> Thanks
> Pavel
> 
> 
> 
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users



------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to