Experience Directory in Software

Java,J2EE,Oracle,Linux experience and workaround tips. If you have thought at least once like "How much should I learn technologies to be good enough developer?", Yes answer is here, just read this articles.All articles are made use at real project and making clients happy!

Friday, June 27, 2008

Apache 2.0 Basic Authentication setting example


1.On the way to Punducherry,Tamil Nadu,India.

2.same.

3.same.



----------------------
Case:
We are using this simplest authentication method for local connection only.The server this applied are never accessed from Internet user.
You would find this helpful if you want someone to recognize you are care for security risk, and you would probably progress this to better one such as Digest authentication(wiki) or else.
----------------------

----------------------
Instructions:
1.create password file with using "etpasswd" tool
2.add basic authentication config in config file.
----------------------

----------------------
1.create password file with using "etpasswd" tool

$htpasswd -c {the absolute path of password file} {user_name}


2.add sample code below to apply basic authentication in config file.

Let's assuming that your path to your password file is in "passwd" directory on document root and file name is "basic_auth_passwd",
"AuthUserFile" parameter value will be "htdocs/passwd/
basic_auth_passwd".
and all you have to do is that you put those code below in your preferred "Directory" derective in config file.

-----
AuthUserFile htdocs/passwd/basic_auth_passwd AuthName "Input ID and Password" AuthType Basic Require valid-user
-----

References:
#Apache Basic Authentication
(http://httpd.apache.org/docs/2.0/en/howto/auth.html)
#Apache Core Features- Directive
(http://httpd.apache.org/docs/2.0/mod/core.html#directory)

No comments:

The On Demand Global Workforce - oDesk