perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Alias and PerlOutputFilterHandler in virtual host configuration
Date Sun, 15 Feb 2009 15:04:58 GMT
Roger Munk wrote:
> I have the following directives in my sites-available/default configuration:
>        DocumentRoot /var/www/
>        Alias /portal/ /var/www/drupal6/
>        PerlRequire "/etc/apache2/ModPerl/TE/"
>         <Location /portal/>
>             SetHandler modperl
>             PerlOutputFilterHandler TE::ST
>         </Location>
See Torsten's response for the SetHandler.
But apart from that, the combination of these 3 directives sounds a bit
strange to me :
>       DocumentRoot /var/www/
>       Alias /portal/ /var/www/drupal6/
>       <Location /portal/>

The first one means that your "document root" (in other words the
filesystem area that corresponds to the URL "/") is /var/www.
In other words, if someone requests "/drupal6", he gets to
/var/www/drupal6, and if he requests "/drupal6/abc.html", he gets
/var/www/drupal6/abc.html (if it exists).
Then the alias says that "/portal/" also maps to "/var/www/drupal6/". So
now the users have 2 ways to get there : "/drupal6" and "/portal/".
So if the user requests "/portal/abc.html", he really gets
"/var/www/drupal6/abc.html" also.
Allright, so you want to make it easy for users, they just have to
remember "portal" instead of "drupal6" (and maybe for you too, if some
day you change that to "drupal7").

But then the <Location> relates to (and only to) when users request
In other words, whatever you put in that Location section does not apply
when users request the same document via "/drupal6".
So if the user requests "/portal/abc.html", the Perl output filter would
be called, but if they ask for "/drupal6/abc.html", it would not run,
although they would get the same document abc.html.

I'm thinking that this is not necessarily the effect you want to
achieve, so what is it that you want to achieve ?

View raw message