8 More Discussions You Might Find Interesting
1. Red Hat
Have no idea on what the below error message is:
Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -buildfile build.xml dist.
Any help? (3 Replies)
Discussion started by: gull05
3 Replies
2. Web Development
Hi,
I'm new to developing modules for Apache. I understand the basics now and can develop something simple which allows a 'GET' request to happen, but what I want to do is actually 'POST' information to my site. I know the basic POST Request works and I can see that it is post by looking at... (2 Replies)
Discussion started by: fishman2001
2 Replies
3. UNIX for Dummies Questions & Answers
Hi, I am new to unix and am trying to determine if apache is installed on my server. Is there a command to determine the running version or if it is even installed. I appreciate your help.
Thanks,
Eric (2 Replies)
Discussion started by: ejbrever
2 Replies
4. IP Networking
I want to have multiple domains to be configured in apache web server on redhat linux
can i have that without DNS server being configured. What all i have to do for that.What all to configure ?
please note that i need to access the site by its name not by IP . I want this in a LAN . I dont... (4 Replies)
Discussion started by: Vijayanand
4 Replies
5. IP Networking
I want to have multiple domains to be configured in apache web server on redhat linux
can i have that without DNS server configured. What all i have to do for that.What all to configure ?
And importantly
i want the site be accessed by name rather IP address.
Please help me
... (1 Reply)
Discussion started by: Vijayanand
1 Replies
6. IP Networking
I want to have multiple domains to be configured in apache web server on redhat linux
Please help me
Vijay (2 Replies)
Discussion started by: Vijayanand
2 Replies
7. UNIX for Dummies Questions & Answers
How do you tell which apache version is currently running.
the situation is that I got multiply httpd.conf files on a solaris 2.6 server and I need to tell which version is what? I have checked the httpd.conf but no joy
Thanks in Advance (3 Replies)
Discussion started by: hassan2
3 Replies
8. UNIX for Dummies Questions & Answers
how must httpd.conf be configured
to exec the php files? (2 Replies)
Discussion started by: user666
2 Replies
HTTP::Server::Simple::Authen(3pm) User Contributed Perl Documentation HTTP::Server::Simple::Authen(3pm)
NAME
HTTP::Server::Simple::Authen - Authentication plugin for HTTP::Server::Simple
SYNOPSIS
package MyServer;
use base qw( HTTP::Server::Simple::Authen HTTP::Server::Simple::CGI);
use Authen::Simple::Passwd;
sub authen_handler {
Authen::Simple::Passwd->new(passwd => '/etc/passwd');
}
sub handle_request {
my($self, $cgi) = @_;
my $user = $self->authenticate or return;
...
}
MyServer->new->run();
DESCRIPTION
HTTP::Server::Simple::Authen is an HTTP::Server::Simple plugin to allow HTTP authentication. Authentication scheme is pluggable and you can
use whatever Authentication protocol that Authen::Simple supports.
You can use "authenticate" method whatever you want to authenticate the request. The method returns $username taken from the request if the
authentication is successful, and "undef" otherwise. The code in "SYNOPSIS" requires authentication for all the requests and behaves just
the same as Apache's "Require valid-user".
The following code will explain more about conditioning.
sub handle_request {
my($self, $cgi) = @_;
if ($cgi->path_info =~ m!/foo/!) {
my $user = $self->authenticate;
return unless defined($user) && length($user) == 8;
}
...
}
This means all the requests to URL "/foo/" require to be authenticated, and usernames with 8 chars long are authorized.
METHODS
Your subclass has to override following methods to implement HTTP authentication.
authen_handler
Should return a valid Authen::Simple instance to authenticate HTTP request (Required).
authen_realm
Returns a string for Authentication realm to be shown in the browser's dialog box. Defaults to 'Authorized area'.
AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
HTTP::Server::Simple, Authen::Simple
perl v5.12.3 2006-01-15 HTTP::Server::Simple::Authen(3pm)