need define a "Fast CGI Authorizer" External App.
here is an example:
Code:
#!/usr/bin/perl
use FCGI;
while (FCGI::accept >= 0)
{
if( $ENV{'REMOTE_USER' } eq "foo" &&
$ENV{'REMOTE_PASSWD'} eq "bar" )
{
print( "Status: 200\n\n" );
}
else
{
print( "Status: 401\n\n" );
print( "WWW-Authenticate: basic realm=\"foo\"\n\n" );
}
}
(source:
http://support.zeus.com/zws/examples/2005/12/16/simple_auth_with_fastcgi)
save above file as(for example) /usr/local/lsws/fcgi-bin/fcgiauth.pl
define an "Fast CGI Authorizer" External App, pointing to it.
then in virtual hosts->Context, define a context(Servlet,Fast CGI, Proxy,Redirect etc), there is an "Authorizer" option, can select the "Fast CGI Authorizer" External App just defined.
hmm I did exactly what you said before
and get this error
I am creating Fast CGI Authorizer in vhost template
I also turn on the highest level on error logs but nothing beside
Can not find handler with type: 7, name: $VH_NAME_authorizerpl
Can not find External Application: $VH_NAME_authorizerpl, type: fcgiauth
gets logged
below excerpt from vhost template
<extProcessor>
<type>fcgiauth</type>
<name>$VH_NAME_authorizerpl</name>
<address>uds://tmp/lshttpd/$VH_NAME_authorizerpl.sock</address>
<note></note>
<maxConns>20</maxConns>
<initTimeout>20</initTimeout>
<retryTimeout>20</retryTimeout>
<persistConn></persistConn>
<pcKeepAliveTimeout></pcKeepAliveTimeout>
<respBuffer>0</respBuffer>
<autoStart>1</autoStart>
<path>/usr/local/lsws/fcgi-bin/authorizer.pl</path>
<backlog>10</backlog>
<instances>5</instances>
<extUser></extUser>
<extGroup></extGroup>
<runOnStartUp></runOnStartUp>
<extMaxIdleTime></extMaxIdleTime>
<priority></priority>
<memSoftLimit></memSoftLimit>
<memHardLimit></memHardLimit>
<procSoftLimit></procSoftLimit>
<procHardLimit></procHardLimit>
</extProcessor>
</extProcessorList>