|
Home > Archive > Apache Server configuration support > August 2006 > authorization using .htaccess not working
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
authorization using .htaccess not working
|
|
| crescent_au@yahoo.com 2006-08-28, 1:34 am |
| Hi all,
I am facing some problem getting the authorization work using .htaccess
file. Whenever I try to login, the login box keeps popping up. I am
unable to login despite entering the right login name and password.
I am using xampp under windows XP.
I am trying to protect the "admin" folder using authorization, which is
in the path: D:/Installation/xampp/htdocs/myshop/catalog/admin.
I have .htaccess file in the above "admin" folder. I have created
..htpasswd file using the command "htpasswd". For now my .htpasswd file
also resides in the above "admin" folder.
The contents of my .htaccess file is:
AuthName "Admin Area"
AuthType Basic
AuthUserFile
D:/Installation/xampp/htdocs/myshop/catalog/admin/.htpasswd
Require user ben
The pertinent contents of httpd.conf
(D:\Installation\xampp\apache\conf\httpd
.conf) are:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "D:/Installation/xampp/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
When I type http://localhost/myshop/catalog/admin, it asks for login
name and password. When I click OK, it keeps asking it. It doesn't seem
to authorize. What have I done wrong? Am I missing something?
Thanks
Ben
| |
| Matthias Gerds 2006-08-28, 1:34 am |
| crescent_au@yahoo.com schrieb:
> Hi all,
>
> I am facing some problem getting the authorization work using .htaccess
> file. Whenever I try to login, the login box keeps popping up. I am
> unable to login despite entering the right login name and password.
Username and Password case sensitive? (In my case under Linux they are.)
> I am using xampp under windows XP.
>
> I am trying to protect the "admin" folder using authorization, which is
> in the path: D:/Installation/xampp/htdocs/myshop/catalog/admin.
>
> I have .htaccess file in the above "admin" folder. I have created
> .htpasswd file using the command "htpasswd". For now my .htpasswd file
> also resides in the above "admin" folder.
>
> The contents of my .htaccess file is:
>
> AuthName "Admin Area"
> AuthType Basic
> AuthUserFile D:/Installation/xampp/htdocs/myshop/catalog/admin/.htpasswd
Should be ONE line.
> Require user ben
>
> The pertinent contents of httpd.conf
> (D:\Installation\xampp\apache\conf\httpd
.conf) are:
>
> <Directory />
> Options FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> </Directory>
>
> <Directory "D:/Installation/xampp/htdocs">
> Options Indexes FollowSymLinks Includes ExecCGI
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
>
> When I type http://localhost/myshop/catalog/admin, it asks for login
> name and password. When I click OK, it keeps asking it. It doesn't seem
> to authorize. What have I done wrong? Am I missing something?
MG
--
Asus K8N-E AMD64 3000+ 1GB
SuSE 9.3 Kernel 2.6.11.4-XX.XX-default
KDE 3.5.4 Level 'a'
| |
| crescent_au@yahoo.com 2006-08-29, 1:50 am |
|
Matthias Gerds wrote:
> crescent_au@yahoo.com schrieb:
>
>
> Username and Password case sensitive? (In my case under Linux they are.)
>
I have typed in the "correct" username and password.
>
> Should be ONE line.
>
It is.
>
>
> MG
>
>
> --
> Asus K8N-E AMD64 3000+ 1GB
> SuSE 9.3 Kernel 2.6.11.4-XX.XX-default
> KDE 3.5.4 Level 'a'
| |
| Mark Taylor 2006-08-30, 7:39 pm |
| crescent_au@yahoo.com wrote in news:1156743383.109142.307930
@i3g2000cwc.googlegroups.com:
> Hi all,
>
> I am facing some problem getting the authorization work using .htaccess
> file. Whenever I try to login, the login box keeps popping up. I am
> unable to login despite entering the right login name and password.
>
> I am using xampp under windows XP.
>
> I am trying to protect the "admin" folder using authorization, which is
> in the path: D:/Installation/xampp/htdocs/myshop/catalog/admin.
>
> I have .htaccess file in the above "admin" folder. I have created
> .htpasswd file using the command "htpasswd". For now my .htpasswd file
> also resides in the above "admin" folder.
>
> The contents of my .htaccess file is:
>
> AuthName "Admin Area"
> AuthType Basic
> AuthUserFile
> D:/Installation/xampp/htdocs/myshop/catalog/admin/.htpasswd
> Require user ben
>
> The pertinent contents of httpd.conf
> (D:\Installation\xampp\apache\conf\httpd
.conf) are:
>
> <Directory />
> Options FollowSymLinks
> AllowOverride None
> Order deny,allow
> Deny from all
> </Directory>
>
> <Directory "D:/Installation/xampp/htdocs">
> Options Indexes FollowSymLinks Includes ExecCGI
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
>
> When I type http://localhost/myshop/catalog/admin, it asks for login
> name and password. When I click OK, it keeps asking it. It doesn't seem
> to authorize. What have I done wrong? Am I missing something?
>
> Thanks
> Ben
>
If you have access to the httpd.conf file it is much, much better to put
the configuration directives in your conf file instead of using .htaccess
And I think you have created a chicken and egg problem. If your htpasswd
file is in the directory it is protecting how can the information be
retrieved? not sure about that though...never done it.
----== Posted via webservertalk.com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.webservertalk.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
|
|
|
|
|