Re: Reading PerlSetVar in mod_perl2
This is a multi-part message in MIME format.
--------------010002020109090407090402
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
[color=blue]
> //<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>[/color]
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 / [url]http://p6m7g8.net/Resume/resume.shtml[/url]
Senior Software Engineer - TicketMaster - [url]http://ticketmaster.com[/url]
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....
--------------010002020109090407090402
Content-Type: text/plain;
name="site.conf"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="site.conf"
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>
--------------010002020109090407090402--