Hii friends.
I got a new problem today in configuration of my apache webserver.
I had created a directory named secretinfo in /var/www/html
[root@server html]# pwd
/var/www/html
[root@server html]# ls
! index.html secretinfo
i had created a file named passwd.txt inside this directory
[root@server html]# cd secretinfo/
[root@server secretinfo]# ls
passwd.txt
[root@server secretinfo]# cat passwd.txt
id:alex
passwd:1234567890
[root@server secretinfo]#
i am trying to secure my website through htaccess
here is configuration of my /etc/httpd/conf/httpd.conf file
# cat /etc/httpd/conf/httpd.conf
<VirtualHost 192.200.1.214>
ServerAdmin
ro...@server.example.com
ServerName
server.example.com
DocumentRoot /var/www/html
ErrorLog /var/log/httpd.txt
DirectoryIndex index.html
<Directory "/var/www/html/secretinfo">
AllowOverride AuthConfig
</Directory>
</VirtualHost>
[root@server secretinfo]#
i had created a .htaccess file inside /var/www/html/secretinfo
directory
[root@server html]# pwd
/var/www/html
[root@server html]# ls -a
. .. .htacess passwd.txt
[root@server secretinfo]#
here is the entry in my .htaccess file
[root@server secretinfo]# cat .htacess
AuthName “plz use a valid username and pasword”
AuthType basic
AuthUserFile /etc/httpd/htpasswd
Recquire user 123
[root@server secretinfo]#
i had also added a user named 123 in htpasswd file
[root@server secretinfo]# htpasswd -mc /etc/httpd/htpasswd 123
New password:
Re-type new password:
Adding password for user 123
[root@server secretinfo]#
i had restarted httpd service after this
[root@server secretinfo]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@server secretinfo]#
Now when i am typing
http://192.200.1.214/secretinfo in my web-browser
it is not asking for any password.
according to me it should ask for a password as i had secured the site
using .htaccess file.
Whats going wrong in this please tell me.