I would really appreciate any replies for the below

Thanks in Advance

On 10/24/06, sajid khan <[EMAIL PROTECTED]> 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 < [EMAIL PROTECTED]> 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 ( [EMAIL PROTECTED] ) 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>




Reply via email to