The structure I used is as follows
1) vim /etc/httpd/conf/httpd.conf --> this is attached file &
permission set is -rw-r--r-- 1 root apache 34047 Jul 29 03:19 httpd.conf
2) cd /opt/champu/private/
3) ls --> wlll show.htaccess & .htpasswd
4) This is used in default apache. i.e. Apache/2.2.3
I am getting web page successfully but not asking for username & password.
So just let me know if there is any wrong information fed in these files
# vi /opt/champu/private/.htaccessAuthUserFile "/opt/champu/private/.htpasswd"
AuthName "Authorization Required"
AuthType Basic
# vi /etc/http/conf/httpd.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/opt/linux"
AccessFileName .htaccess
ServerName ns0.linenix.com
ServerAlias linux.local
ErrorLog logs/www.linux.com-error_log
CustomLog logs/www.linux.com-access_log common
<Directory "/opt/champu/private/">
AllowOverride AuthConfig
</Directory>
</VirtualHost>
# vi /opt/champu/private/.htpasswd
musa:MK9hqxayljms6
Thanks with Regards
Maheboob Shaikh
-------------------------------------------------------
Put this in apache config file or explicit virtual host file if you have for
domain..
<Directory "/opt/champu/private/">
Options -Indexes FollowSymLinks
AllowOverride AuthConfig
Order allow,deny
Allow from all
AuthUserFile /opt/champu/private/.htpasswd
AuthName "Authorization Required"
AuthType Basic
Require user musa
</Directory>
-Mubeen
[Non-text portions of this message have been removed]