You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jobst Schmalenbach <jo...@barrett.com.au> on 2019/02/18 03:05:18 UTC

[users@httpd] Apache upgrade 2.2 -> 2.4 and "PerlAuthenHandler Authen::Simple::IMAP"

Hi

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.

While I have fixed most of the issues one that I cannot solve is the
"PerlAuthenHandler Authen::Simple::IMAP" in .htaccess files.

I use this 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) 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>

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.

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

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

thanks
Jobst


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache upgrade 2.2 -> 2.4 and "PerlAuthenHandler Authen::Simple::IMAP"

Posted by Jobst Schmalenbach <jo...@barrett.com.au>.
On Wed, Feb 20, 2019 at 06:58:55AM +0100, Luca Toscano (toscano.luca@gmail.com) wrote:
> Hi again,
> 
> Can you use something like LogLevel warn perl:trace8 and see if you
> get more info in the error log?

Thanks.

I have tried before to set the log level in "/etc/httpd/conf.d/perl.conf" to "PerlSwitches -d" which gave me far more output than I ever expected. Using your suggestion "LogLevel warn perl:trace8" does not really give a lot of lines.

What I needed was to get the modules loaded and get some output from that.
But luckely I found this:

   https://www.gsp.com/cgi-bin/man.cgi?topic=Authen::Simple::Passwd

which writes a completely different story in .htacess:

  PerlModule        Authen::Simple::Apache
  PerlModule        Authen::Simple::IMAP
  PerlAuthenHandler Authen::Simple::IMAP
  AuthType          Basic
  AuthName          "Protected Area"
  Require           user USER1 USER2

which FINALLY gave me a login box.

Jobst



-- 
My software never has bugs; it just develops random features.

  | |0| |   Jobst Schmalenbach, General Manager
  | | |0|   Barrett & Sales Essentials
  |0|0|0|   +61 3 9533 0000, POBox 277, Caulfield South, 3162, Australia

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache upgrade 2.2 -> 2.4 and "PerlAuthenHandler Authen::Simple::IMAP"

Posted by Luca Toscano <to...@gmail.com>.
Hi again,

Can you use something like LogLevel warn perl:trace8 and see if you
get more info in the error log?

Luca

Il giorno mer 20 feb 2019 alle ore 02:23 Jobst Schmalenbach
<jo...@barrett.com.au> ha scritto:
>
> On Mon, Feb 18, 2019 at 07:47:20AM +0100, Luca Toscano (toscano.luca@gmail.com) wrote:
> > Hi Jobst,
> >
> > Il giorno lun 18 feb 2019 alle ore 04:05 Jobst Schmalenbach
> > <jo...@barrett.com.au> ha scritto:
> >
> > Have you installed the perl Authen::Simple::IMAP library? This seems
> > more a Perl issue than a httpd one.. I'd follow up with the mod_perl
> > community support (the module is not part of the standard httpd
> > distribution - https://perl.apache.org/maillist/index.html).
>
> I did via yum.
> I tested it via a small perl script, too, nothing wrong with that.
>
> THe problem I cannot see any error messages in the logs, nothing.
> If I could I would have some info, but its plain nothing.
>
> Jobst
>
>
>
> --
> f u cn rd ths, u cn gt a gd jb n cmptr prgmmng. [Anon]
>
>   | |0| |   Jobst Schmalenbach, General Manager
>   | | |0|   Barrett & Sales Essentials
>   |0|0|0|   +61 3 9533 0000, POBox 277, Caulfield South, 3162, Australia
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache upgrade 2.2 -> 2.4 and "PerlAuthenHandler Authen::Simple::IMAP"

Posted by Jobst Schmalenbach <jo...@barrett.com.au>.
On Mon, Feb 18, 2019 at 07:47:20AM +0100, Luca Toscano (toscano.luca@gmail.com) wrote:
> Hi Jobst,
> 
> Il giorno lun 18 feb 2019 alle ore 04:05 Jobst Schmalenbach
> <jo...@barrett.com.au> ha scritto:
> 
> Have you installed the perl Authen::Simple::IMAP library? This seems
> more a Perl issue than a httpd one.. I'd follow up with the mod_perl
> community support (the module is not part of the standard httpd
> distribution - https://perl.apache.org/maillist/index.html).

I did via yum.
I tested it via a small perl script, too, nothing wrong with that.

THe problem I cannot see any error messages in the logs, nothing.
If I could I would have some info, but its plain nothing.

Jobst



-- 
f u cn rd ths, u cn gt a gd jb n cmptr prgmmng. [Anon]

  | |0| |   Jobst Schmalenbach, General Manager
  | | |0|   Barrett & Sales Essentials
  |0|0|0|   +61 3 9533 0000, POBox 277, Caulfield South, 3162, Australia

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Apache upgrade 2.2 -> 2.4 and "PerlAuthenHandler Authen::Simple::IMAP"

Posted by Luca Toscano <to...@gmail.com>.
Hi Jobst,

Il giorno lun 18 feb 2019 alle ore 04:05 Jobst Schmalenbach
<jo...@barrett.com.au> ha scritto:
>
> Hi
>
> 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.
>
> While I have fixed most of the issues one that I cannot solve is the
> "PerlAuthenHandler Authen::Simple::IMAP" in .htaccess files.
>
> I use this 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) 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>
>
> 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.
>
> 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

Have you installed the perl Authen::Simple::IMAP library? This seems
more a Perl issue than a httpd one.. I'd follow up with the mod_perl
community support (the module is not part of the standard httpd
distribution - https://perl.apache.org/maillist/index.html).

Hope that helps!

Luca

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org