in reply to Setting "Domain" dynamically when using Apache2::AuthCookie

Setting "Domain" dynamically when using Apache2::AuthCookie. Title says it all.I've tried $r->dir_config and even more obscure paths and suspect I can't see the forest for the trees. Any suggestions welcome :)

What did you try exactly and where (what file, context)?

  • Comment on Re: Setting "Domain" dynamically when using Apache2::AuthCookie

Replies are listed 'Best First'.
Re^2: Setting "Domain" dynamically when using Apache2::AuthCookie
by Anonymous Monk on Sep 17, 2015 at 23:55 UTC

    If Apache2::AuthCookie with mod_perl: Apache2::PerlSections - write Apache configuration files in Perl

    Then maybe

    $VirtualHost{"www.yourdomain.com"} = { DocumentRoot => "/tmp/docs", ErrorLog => "/dev/null", WhatEverSatisfy => "Any", WhatEverDomain => ".yourdomain.com", Location => { "/" => { Allowoverride => 'All', Order => 'deny,allow', Deny => 'from all', Allow => 'from foo.com', }, "/protected" => { AuthType => 'Sample::Apache2::AuthCookieHandler', AuthName => 'WhatEver', ## might be "AuthenHandler" PerlAuthenHandler => "Sample::Apache2::AuthCookieHandler-> +authenticate", PerlAuthzHandler => "Sample::Apache2::AuthCookieHandler->a +uthorize", require => "valid-user", }, }, };

    Maybe also idea to use prefix of "yourdomainAUC" for all those cookie auth vars

      I guess a couple customized apache configs is better than trying to be all elegant and complicated. Thanks!