BASIC Authentication with Apache

Create user.txt with the username and password separated by colon


Then use the htpasswd to encrypt the password

Apache2bin>htpasswd.exe -b user.txt testuser testuser
Automatically using MD5 format.
Updating password for user testuser

Add the following in the httpd.conf file present in C:Program FilesApache GroupApache2bin

LoadModule weblogic_module modules/

<Location />
SetHandler weblogic-handler
WebLogicHost localhost
WebLogicPort 7001
Debug ALL
WLLogFile c:/muthu/wlproxy.log
WLTempDir c:/muthu
AuthUserFile C:/muthu/user.txt
AuthName “This is a protected area”
AuthType Basic
Require valid-user

Also copy to C:Program FilesApache GroupApache2modules

Restart the Apache Server.

Now if we try to access any unprotected resource on Weblogic Server, a BASIC Authentication Window will be popped up for authentication against Apache.

If authentication is successful, the request will go through provided we set the following in the config.xml


Otherwise Weblogic Server will try to validate the BASIC authentication Header.