------=_Part_136358_23341630.1161629153247
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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_136358_23341630.1161629153247
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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 <gollucci@p6m7g8.com">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 (gollucci@p6m7g8.com">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_136358_23341630.1161629153247--