* Jobst Schmalenbach <jo...@barrett.com.au> wrote:

> Date: Wed, 20 Feb 2019 12:33:22 +1100
> From: Jobst Schmalenbach <jo...@barrett.com.au>
> To: modperl@perl.apache.org
> Subject: Apache upgrade 2.2 -> 2.4 and "PerlAuthenHandler
>  Authen::Simple::IMAP"
> User-Agent: Mutt/1.9.1 (2017-09-22)
> 
> I posted this first on the Apache mailing list, one person mentioned as this 
> is mod_perl related I should post it here, so here it is.
> 
> I have just started upgrading all of my CentOS servers from 6.X to 7.X, with 
> that Apache gets upgraded from 2.2 to 2.4, but it seems mod_perl has not 
> increased the version number.
> 
> While I have fixed most of the issues realted to the upgrade of Apache one I 
> cannot solve is the "PerlAuthenHandler Authen::Simple::IMAP" in .htaccess 
> files.
> 
> I use this rather frequently on many machines as it is real easy for me to 
> look after this.
> 
> Using apache 2.2 this used to work like a charm with an .htaccess file in the 
> directory to protect:
> 
>     satisfy any
>     Order deny,allow
>     deny from all
> 
>     AuthName "Protected by IMAP credentials"
>     AuthType Basic
>     require user USER1 USER2
>     PerlAuthenHandler Authen::Simple::IMAP
>     PerlSetVar        AuthenSimpleIMAP_host     
> "CENTRAL.IMAPS.SERVER.HOST.NAME"
>     PerlSetVar        AuthenSimpleIMAP_protocol "IMAPS"
> 
>     allow from localhost
>     allow from THESERVER
> 
> I re-wrote this for apache 2.4 (not repeating the perl stuff which is the 
> same in both) but same .htaccess file
> 
>    <RequireAll>
>      Require user USER1 USER2
>      # do not turn this off, or else this will not work.
>      Require ip 127.0.0.1
>      Require host localhost
>      Require host THESERVER
>    </RequireAll>
 
Not sure how you went with this issue, but you might want to try this instead:

<RequireAll>
    Require user USER1 USER2
    <RequireAny>
        Require ip 127.0.0.1
        Require host localhost
        Require host THESERVER
    </RequireAny>
</RequireAll>

Regards,


Jie

(I am currently having problems sending to/receiving from the list with my 
posts at the moment.)


> In the server's httpd.conf file I have:
> 
>    PerlRequire /etc/httpd/conf/startup.pl
> 
> which contains this:
> 
>    #!/bin/env /usr/bin/perl
>    use strict;
>    use warnings;
>    use Authen::Simple::IMAP;
>    1;
> 
> This loads with no error messages (this also means mod_perl is working).
> 
> The problem really is:
> 
>   ==> error_log <==
>   failed to resolve handler Authen::Simple::IMAP
>   failed to resolve handler Authen::Simple::IMAP
>   failed to resolve handler Authen::Simple::IMAP
>   failed to resolve handler Authen::Simple::IMAP
> 
> The browser page displays a "Secure connection failed" which is crap as the 
> certificate and everything is in perfect condition.
> 
> 
> How can I make this work with apache 2.4?
> What am I doing wrong?
> 
> 
> thanks
> Jobst
> 
> 
> 
> -- 
> If a pig loses its voice, is it disgruntled?
> 
>   | |0| |   Jobst Schmalenbach, General Manager
>   | | |0|   Barrett & Sales Essentials
>   |0|0|0|   +61 3 9533 0000, POBox 277, Caulfield South, 3162, Australia
> 

Reply via email to