Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 94586 invoked from network); 26 Oct 2006 05:38:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2006 05:38:21 -0000 Received: (qmail 56746 invoked by uid 500); 24 Oct 2006 17:14:28 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 56713 invoked by uid 500); 24 Oct 2006 17:14:28 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 56702 invoked by uid 99); 24 Oct 2006 17:14:27 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2006 10:14:27 -0700 X-ASF-Spam-Status: No, hits=2.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,MAILTO_TO_SPAM_ADDR,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of sajid321@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nf-out-0910.google.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2006 10:14:15 -0700 Received: by nf-out-0910.google.com with SMTP id o60so271097nfa for ; Tue, 24 Oct 2006 10:13:54 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=WOlf2NdinwjGzm9TKDJqGGu6kSFKPX6u04p7uMyLkYbOJtw9elCcR49n0ZEQzVEeVDvftNsF9zf5a1WVTYeImuFlVdcn98Uy8cfaKluF5/flOC2bN+wML/wldIRLaKXHirE1jeCxa66cdKy1n81W55e9qVBP+cP3KfQIceDle78= Received: by 10.82.129.8 with SMTP id b8mr2071745bud; Tue, 24 Oct 2006 10:13:53 -0700 (PDT) Received: by 10.82.173.20 with HTTP; Tue, 24 Oct 2006 10:13:53 -0700 (PDT) Message-ID: <97b6648c0610241013u3614635fj8d4d5e35ab255028@mail.gmail.com> Date: Tue, 24 Oct 2006 22:43:53 +0530 From: "sajid khan" To: "Philip M. Gollucci" Subject: Re: Reading PerlSetVar in mod_perl2 Cc: "Perrin Harkins" , modperl@perl.apache.org In-Reply-To: <97b6648c0610231145l51db8efcu6fac082b9cda454b@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_10579_30928890.1161710033776" References: <1161267321.4139.5.camel@localhost.localdomain> <97b6648c0610210028j2da689bds3d1196585318ced2@mail.gmail.com> <453BE850.5040602@p6m7g8.com> <97b6648c0610231145l51db8efcu6fac082b9cda454b@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_10579_30928890.1161710033776 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I would really appreciate any replies for the below Thanks in Advance On 10/24/06, sajid khan wrote: > > Hi Philip, > > I already replied to this thread, since I dont see my posting I am > replying it again > > >>Last location directive wins for the same location is why. This is an > httpd thing having >>nothing to do with mod_perl > I see that last Location directive is winning, I have 2 questions > regarding this > > 1.This was not happening in apache 1.3, Is there any apache 2 > documentation which mentions this behaviour > 2.Does the Location information is rewritten if apache encounters another > Location directive for same mapping in httpd.conf? > > Thanks, > > > > > On 10/23/06, Philip M. Gollucci wrote: > > > > ///// > > > /SSLRequireSSL > > > //SetHandler perl-script// > > > //////PerlSetVar somevar1 1 > > > ////PerlSetVar somevar2 2 > > > ////PerlHandler Apache::Hello// > > > // > > > // > > > and then below that > > > > > > > > > PerlAccessHandler Apache::Hello1 > > > > > > > You want this: > > > > SSLRequireSSL > > SetHandler perl-script > > PerlSetVar somevar1 1 > > PerlSetVar somevar2 2 > > PerlResponseHandler Apache::Hello->handler > > PerlAccessHandler Apache::Hello1->access > > > > > > > > Last location directive wins for the same location is why. This is an > > httpd thing having nothing to do with mod_perl. > > > > You might find the following sample httpd.conf useful. > > > > > > -- > > ------------------------------------------------------------------------ > > Philip M. Gollucci (pgollucci@p6m7g8.com ) 323.219.4708 > > Consultant / http://p6m7g8.net/Resume/resume.shtml > > Senior Software Engineer - TicketMaster - http://ticketmaster.com > > 1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F > > > > When I call your name, Girl, it starts to flame > > Burning in my heart, Tearing it all apart.. > > No matter how I try My love I cannot hide.... > > > > > > Listen 80 > > > > NameVirtualHost * > > > > > > ServerName site.tld > > > > RewriteEngine On > > # RewriteLogLevel 2 > > # RewriteLog $SITE/logs/httpd-rewrite_log > > > > RewriteRule ^/application/login > > https://%{SERVER_NAME}/application/login [L,R] > > > > DocumentRoot $SITE/htdocs > > Alias /images/ "$SITE/images/" > > Alias /css/ "$SITE/css/" > > Alias /js/ "$SITE/js/" > > > > ErrorLog "$SITE/logs/httpd-error_log" > > CustomLog "$SITE/logs/httpd-access_log" common > > CustomLog "$SITE/logs/httpd-referer_log" referer > > CustomLog "$SITE/logs/httpd-agent_log" agent > > > > > > Options Indexes FollowSymLinks MultiViews > > AllowOverride None > > Order allow,deny > > Allow from all > > > > > > PerlMapToStorageHandler APP::MapToStorage > > > > ### AAA > > > > AuthType Basic > > AuthName "APP" > > Require valid-user > > > > PerlAccessHandler APP::Access > > PerlAuthenHandler APP::Authen > > PerlAuthzHandler APP::Authz > > > > > > ## Registered > > > > SetHandler modperl > > PerlResponseHandler APP::Login > > > > > > ## Not protected > > > > SetHandler modperl > > PerlResponseHandler APP::Privacy > > > > > > SetHandler modperl > > PerlResponseHandler APP::Register > > > > > > ## Loggged in - ALL > > > > SetHandler modperl > > PerlResponseHandler APP::Logout > > > > > > > > SetHandler modperl > > PerlResponseHandler APP::Intro > > > > > > ## Logged in - Resource: Users > > > > SetHandler modperl > > PerlResponseHandler APP::Users->list > > > > > > > > > > > ------=_Part_10579_30928890.1161710033776 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I would really appreciate any replies for the below

Thanks in Advance

On 10/24/06, sajid khan <sajid321@gmail.com> wrote:
Hi Philip,
 
I already replied to this thread, since I dont see my posting I am replying it again
 
>>Last location directive wins for the same location is why.  This is an httpd thing having >>nothing to do with mod_perl
I see that last Location directive is winning, I have 2 questions regarding this
 
1.This was not happening in apache 1.3, Is there any apache 2 documentation which mentions this behaviour
2.Does the Location information is rewritten if apache encounters another Location directive for same mapping in httpd.conf?
 
Thanks,
 


 
On 10/23/06, Philip M. Gollucci < pgollucci@p6m7g8.com> wrote:
> //<Location /someurl>///
> /SSLRequireSSL
> //SetHandler            perl-script//
> //////PerlSetVar            somevar1    1
> ////PerlSetVar            somevar2   2
> ////PerlHandler           Apache::Hello//
> //</Location>
> //
> and then below that
>
> <Location /someurl>
> PerlAccessHandler   Apache::Hello1
> </Location>

You want this:
<Location /someurl>
  SSLRequireSSL
  SetHandler            perl-script
  PerlSetVar            somevar1    1
  PerlSetVar            somevar2   2
  PerlResponseHandler   Apache::Hello->handler
  PerlAccessHandler     Apache::Hello1->access
</Location>


Last location directive wins for the same location is why.  This is an httpd thing having nothing to do with mod_perl.

You might find the following sample httpd.conf useful.


--
------------------------------------------------------------------------
Philip M. Gollucci ( pgollucci@p6m7g8.com ) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

When I call your name, Girl, it starts to flame
Burning in my heart, Tearing it all apart..
No matter how I try My love I cannot hide....


Listen 80

NameVirtualHost *

<VirtualHost site:80>
       ServerName site.tld

       RewriteEngine On
#        RewriteLogLevel 2
#        RewriteLog $SITE/logs/httpd-rewrite_log

       RewriteRule  ^/application/login   https://%{SERVER_NAME}/application/login [L,R]

       DocumentRoot    $SITE/htdocs
       Alias           /images/        "$SITE/images/"
       Alias           /css/           "$SITE/css/"
       Alias           /js/            "$SITE/js/"

       ErrorLog  "$SITE/logs/httpd-error_log"
       CustomLog "$SITE/logs/httpd-access_log" common
       CustomLog "$SITE/logs/httpd-referer_log" referer
       CustomLog "$SITE/logs/httpd-agent_log" agent

       <Directory "$SITE/htdocs">
               Options Indexes FollowSymLinks MultiViews
               AllowOverride None
               Order allow,deny
               Allow from all
       </Directory>

       PerlMapToStorageHandler APP::MapToStorage

       ### AAA
       <Location /application>
           AuthType Basic
           AuthName "APP"
           Require valid-user

           PerlAccessHandler APP::Access
           PerlAuthenHandler APP::Authen
           PerlAuthzHandler APP::Authz
       </Location>

       ## Registered
       <Location /application/login>
           SetHandler modperl
           PerlResponseHandler APP::Login
       </Location>

       ## Not protected
       <Location /application/privacy>
           SetHandler modperl
           PerlResponseHandler APP::Privacy
       </Location>
       <Location /application/register>
           SetHandler modperl
           PerlResponseHandler APP::Register
       </Location>

       ## Loggged in - ALL
       <Location /application/logout>
           SetHandler modperl
           PerlResponseHandler APP::Logout
       </Location>

       <Location /application/intro>
           SetHandler modperl
           PerlResponseHandler APP::Intro
       </Location>

       ## Logged in - Resource: Users
       <Location /application/users/list>
           SetHandler modperl
           PerlResponseHandler APP::Users->list
       </Location>
</VirtualHost>




------=_Part_10579_30928890.1161710033776--