Radoslaw Zielinski wrote:
> With persistent database connections and prepared statements it doesn't
> hurt that much in terms of performance.  Just make sure you're not
> checking what you don't have to (images, *.css, etc).
>
Which is why (we) generally suggest that you don't setup handlers on Location /. It generally is more trouble then its worth, but is useful from time-to-time.

See the 2 attachments for an example.




--
------------------------------------------------------------------------
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

"It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone..."
Listen 80

NameVirtualHost *

<VirtualHost X:80>
        ServerName X

        RewriteEngine On
#        RewriteLogLevel 2
#        RewriteLog /base/logs/httpd-rewrite_log

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

        DocumentRoot    /base/htdocs
        Alias           /images/        "/base/images/"
        Alias           /css/           "/base/css/"
        Alias           /js/            "/base/js/"

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

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

        PerlMapToStorageHandler NS::MapToStorage

        ### AAA
        <Location /path>
            AuthType Basic
            AuthName "TEXT"
            Require valid-user

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

        ## Registered
        <Location /path/login>
            SetHandler modperl
            PerlResponseHandler NS::Login
        </Location>

        ## Not protected
        <Location /path/privacy>
            SetHandler modperl
            PerlResponseHandler NS::Privacy
        </Location>
        <Location /path/register>
            SetHandler modperl
            PerlResponseHandler NS::Register
        </Location>

        ## Loggged in - ALL
        <Location /path/logout>
            SetHandler modperl
            PerlResponseHandler NS::Logout
        </Location>
</VirtualHost>
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl

SSLRandomSeed startup builtin
SSLRandomSeed connect builtin

SSLMutex  file:/base/logs/httpd-ssl_mutex
SSLSessionCache shm:/base/logs/httpd-ssl_gcache_data(512000)

SetEnvIf User-Agent ".*MSIE.*" \
         nokeepalive ssl-unclean-shutdown \
         downgrade-1.0 force-response-1.0

Listen 443

NameVirtualHost *
<VirtualHost X:443>
        ServerName X

        SSLEngine  On
        SSLCertificateFile     /base/conf/certs/X.crt
        SSLCertificateKeyFile  /base/conf/keys/X.key

        RewriteEngine On
#        RewriteLogLevel 2
#        RewriteLog /base/logs/httpsd-rewrite_log

        RewriteRule  ^/path/intro   http://%{SERVER_NAME}/path/intro [L,R]

        ErrorLog  "/base/logs/httpsd-error_log"
        CustomLog "/base/logs/httpsd-access_log" common
        CustomLog "/base/logs/httpsd-referer_log" referer
        CustomLog "/base/logs/httpsd-agent_log" agent

        DocumentRoot    /base/htdocs
        Alias           /images/        "/base/images/"
        Alias           /css/           "/base/css/"
        Alias           /js/            "/base/js/"

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

        PerlMapToStorageHandler NS::MapToStorage

        ## Registered
        <Location /path/login>
            SetHandler modperl

            AuthType Basic
            AuthName "TEXT"
            Require valid-user

            PerlAccessHandler NS::Access
            PerlAuthenHandler NS::Authen

            PerlResponseHandler NS::Login
        </Location>
</VirtualHost>

Reply via email to