|
Java Apache Project : Apache JServ 1.0 : Configuration :
How do I setup basic authentication with Apache and Apache JServ? |
You need to use the Location tag in Apache instead of the Directory tag.
See the Apache documentation http://www.apache.org/ for more information on
the use of the Location tag.
Here is an example that worked for one Apache JServ user:
<Location /servlet/msgboard>
AuthType Basic
AuthName msgboard_access
AuthUserFile /usr/local/apache/conf
<Limit GET POST>
require user some_user
/Limit
/LocationjonATworking-dogsDOTcom |
You don't always have to use the <Limit ...>/Limit directive. Remember,
it restricts access to the _selected methods_ (and forgets about HEAD and
OPTIONS, at least as for Apache 1.3.3, while the Auth* just simply
restrict the access.
vtATvpDOTnet |
For those new to all this, on Linux (and other Unices?) you can create the password file using /usr/bin/htpasswd.
bknightsATearthlinkDOTnet |
| [Append to This Answer] |