Sponsored Content
Full Discussion: apache configuration
Top Forums UNIX for Advanced & Expert Users apache configuration Post 56968 by hachik on Friday 15th of October 2004 06:18:14 AM
Old 10-15-2004
apache configuration

Hi. I run openbsd and apache 1.3.29
PHP/4.3.9 mod_perl/1.29 DAV/1.0.3 mod_ssl/2.8.16 OpenSSL/0.9.7c

anyway,problem is i have in httpd.conf allow override all in /dir1
and 2 directories
/dir1/.htaccess is

AuthType Basic
AuthName "Password Required"
AuthUserFile /passwords/password.file
Require valid-user

/dir1/visible/.htaccess
Allow from all
Satisfy Any

BUT that damn configuration doesnt work!
any suggestions, i'm over in my ideas.
 

9 More Discussions You Might Find Interesting

1. Solaris

Apache Configuration issue on Solaris

I seem to have an issue with Apache configurationon our Sun solaris Server. Since there are 2 my_app instances running in parallel, the perl modules in my_app_perl_libs are getting shared between them, even though they are in different directories (/u01/my_app and /u01/my_app8). This is because... (1 Reply)
Discussion started by: rahulrathod
1 Replies

2. Web Development

Apache Configuration File

I am new in Linux configure Apache. I got few questions to ask. I am will grateful for the help. Thanks. 1) In the Apache Configuration File, where is actually the base for the web tree? 2) I wanted to create a directory (called java) inside the base of the web tree. How am I going to do... (5 Replies)
Discussion started by: newlinuxuser
5 Replies

3. Solaris

JAMES (Java Apache Mail Enterprise Server) - Installation/Configuration Problem

Good Afternoon Intelligent Administrators/Debuggers! I am installing JAMES on an internal server (192.168.2.33) Specs of xxx.xxx.xxx.33 = SunOS v210b 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Fire-V210 After placing and "gunziping" the respective file, I am trying to run it by: ... (1 Reply)
Discussion started by: kazmiM
1 Replies

4. Web Development

Need help on Apache configuration for redirecting URLS

I am extremely new to Apache httpd configuration. Can you please help here below is my requirement. If the URL match existing resource - return resource. If the URL doesn't match existing resource it should return index.html from the app root directory. Apps root directories are: 1.... (0 Replies)
Discussion started by: kar_333
0 Replies

5. Linux

Apache httpd configuration - Issues with APR

Hi I have tried setting up of Apache http server - httpd-2.4.25. During configuration, I understand it needs APR to be setup. Hence I have downloaded APR & APR-Util. Performed, tar xvfC apr-1.5.2.tar /root/httpd-2.4.25/srclib/apr What is happening is there is another directory... (1 Reply)
Discussion started by: videsh77
1 Replies

6. Shell Programming and Scripting

Apache configuration Automation based on location

Hi I need to find a way to automate the deployment of my apache configuration to a few servers. I make change frequently on apache/conf/... etc, and I usually do this manually by copying files to each servers(and country config path)and restart apache servers.Source file will be like... (1 Reply)
Discussion started by: naresh2389
1 Replies

7. Red Hat

About the apache for ipv6 configuration

I am running apache 2 on centos 7 which is running ipv4 , now I would like to enable it to support ipv6 , would advise what I need to change to Adding IPv6 support to the server ? or nothing need to do ? the existing vhosts is as below . <VirtualHost *:80> ServerAdmin xxx.com.hk " "... (2 Replies)
Discussion started by: ust3
2 Replies

8. UNIX for Advanced & Expert Users

Apache log rotate configuration

HI i was trying to configure logrotate for my apache server and it's not working properly. here is my lodrotate configuration /var/log/httpd/*log { daily missingok notifempty sharedscripts compress delaycompress postrotate /sbin/service httpd... (1 Reply)
Discussion started by: bentech4u
1 Replies

9. Red Hat

Apache log rotate configuration

HI i was trying to configure logrotate for my apache server and it's not working properly. Os: Red Hat 6 here is my lodrotate configuration /var/log/httpd/*log { daily missingok notifempty sharedscripts compress delaycompress postrotate ... (3 Replies)
Discussion started by: bentech4u
3 Replies
AuthenHook(3pm) 					User Contributed Perl Documentation					   AuthenHook(3pm)

NAME
Apache::AuthenHook - Perl API for Apache 2.1 authentication SYNOPSIS
PerlLoadModule Apache::AuthenHook PerlModule My::OtherProvider <Location /digest> Require valid-user AuthType Digest AuthName realm1 AuthDigestProvider My::DigestProvider file My::OtherProvider::digest AuthUserFile realm1 </Location> <Location /basic> Require valid-user AuthType Basic AuthName foorealm AuthBasicProvider My::OtherProvider::basic file My::BasicProvider AuthUserFile realm1 </Location> DESCRIPTION
Apache::AuthenHook offers access to the 2.1 Apache authentication API in Perl. This is different than the authentication API from Apache 1.3 or even Apache 2.0, but in its differences lies strength. For a full description of how authentication works in 2.1, see http://www.serverwatch.com/tutorials/article.php/2202671 Basically, the difference between 2.0 and 2.1 is that authentication is now delegated to providers, and each provider has a specific purpose. For instance, mod_authn_file covers gleaning the password from an .htpasswd or .htdigest file, while mod_auth_basic covers the Basic dialogue between the client and server, regardless of the source of the password. The best part of all this (to me) is that Digest authentication is also delegated out - mod_auth_digest now handles all the intricacies of Digest authentication (including the elusive MSIE support) which means you don't need to worry about them (and neither do I). All that Digest authentication requires is *some* authentication provider to provide user credentials - this can be via mod_authn_file or another mechanism of your choosing. Apache::AuthenHook registers and coordinates the use of Perl handlers as authentication providers. How does this affect you? Read on... EXAMPLE
Say you want to enable Digest authentication in your Apache 2.1 server... PerlLoadModule Apache::AuthenHook <Location /digest> Require valid-user AuthType Digest AuthName realm1 AuthDigestProvider My::DigestProvider file AuthUserFile realm1 </Location> This configuration means that My::DigestProvider will be responsible for providing user credentials for requests to /digest. if My::DigestProvider finds a suitable user, mod_auth_digest will verify those credentials and take care of setting all the proper headers, set the proper HTTP response status, and so on. If My::DigestProvider cannot find a matching user it can decide what to do next - either pass the user to the next provider (in this case the default file provider, which will use the flat file "realm1") or decide that no user means no access. Here is a simple My::DigestProvider use Apache2::Const -compile => qw(OK DECLINED HTTP_UNAUTHORIZED); sub handler { my ($r, $user, $realm, $hash) = @_; # user1 at realm1 is found - pass to mod_auth_digest if ($user eq 'user1' && $realm eq 'realm1') { $$hash = 'eee52b97527306e9e8c4613b7fa800eb'; return Apache2::Const::OK; } # user2 is denied outright if ($user eq 'user2' && $realm eq 'realm1') { return Apache2::Const::HTTP_UNAUTHORIZED; } # all others are passed along to the next provider return Apache2::Const::DECLINED; } isn't that easy? the only thing that is a bit tricky here is $$hash. the fourth argument passed to your handler, $hash, is a reference to to a simple scalar that needs to be populated with the MD5 hash of the user:realm:password combination you determine for the incoming user. this may seem a bit strange, but it is actually exactly how things work over in Apache C land, so I guess that makes it ok. as you can see, returning OK means "user found" and requires that $$hash be populated - mod_auth_digest will take care of determining whether the hash matches the incoming Digest criteria. returning HTTP_UNAUTHORIZED (which is the same as the former and still available AUTH_REQUIRED constant) means "no access." returning DECLINED means "some other provider can try." The steps are remarkably similar for Basic authentication, first <Location /basic> Require valid-user AuthType Basic AuthName foorealm AuthBasicProvider My::BasicProvider file AuthUserFile realm1 </Location> then use Apache2::Const -compile => qw(OK DECLINED HTTP_UNAUTHORIZED); sub handler { my ($r, $user, $password) = @_; # user1/basic1 is ok if ($user eq 'user1' && $password eq 'basic1') { return Apache2::Const::OK; } # user2 is denied outright if ($user eq 'user2') { return Apache2::Const::HTTP_UNAUTHORIZED; } # all others are passed along to the next provider return Apache2::Const::DECLINED; } In the case of Basic authentication, the return codes mean essentially the same thing. The one exception is that OK means that you have checked the user against the password and have found that they match (as opposed to with Digest, where the actual verification is not done by you). These explanations should be enough to get you going - see the files in the test suite for more examples. NOTES
This has been tested under the prefork MPM only, using mostly Perl 5.9.0 (as well as some 5.8.0). It will not work under threaded MPMs - soon, just not yet. FEATURES
/BUGS This is very much so alphaware, so beware - bugs may lurk in unexpected places. there is one bug that is outside of my control, though, and concerns MSIE and Digest authentication for URIs that include query strings. see http://httpd.apache.org/docs-2.0/mod/mod_auth_digest.html one workaround for this issue is is to use POST instead of GET for your forms. A limitation of this interface is that you can't use Perl providers that are not at least two levels deep - the criterion for registering a Perl provider is a simple check for a double-colon. for example, My::Provider will work while Provider won't (although Provider::handler will). anyway, single level handlers are rare, so fixing it would be a lot of trouble for little benefit. AUTHOR
Geoffrey Young <geoff@modperlcookbook.org> COPYRIGHT
Copyright (c) 2003, Geoffrey Young All rights reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. perl v5.14.2 2005-04-12 AuthenHook(3pm)
All times are GMT -4. The time now is 02:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy