BASIC Authentication with Apache

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


Then use the htpasswd to encrypt the password

Apache2\bin>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 Files\Apache Group\Apache2\bin

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 WL_HOME\server\plugin\win\32\ to C:\Program Files\Apache Group\Apache2\modules

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.

Leave a Reply