URN Logo
UNIX Resources » Linux » Linux Forum » Linux Web Servers » Page.8 » Apache2 .htaccess - Unable To Get Password Prompt.
announcement The content of this page is collected from Linux Forum, All copyrights and other associated rights are reserved by the original authors of the articles.
Resources
China Linux Forum(finished)
Linux Forum(finished)
FreeBSD China(finished)
linuxforum.com
  LinuxForum General Chat
  Linux Advocacy
  LinuxForum Polls
  Introductions
  Linux Kernel Support
  Patch Management
  Development Release
  Linux Programming
  Linux Security
  Linux Software
  Linux Hardware Problems
    Linux Video Problems
    Linux Sound Problems
  Linux Networking Support
  Linux Printing Support
  Linux Human Interface Devices Support
  Linux Data Storage Support
  Linux Applications Support
  Linux Installation Support
  Linux Laptops Support
  Linux Motherboard, Chipsets, CPU, Memory
  Miscellaneous
  Debian Linux Support
  Ubuntu Linux Support
  LiveCD Discussions
  Gentoo Linux Support
  Mandrake Linux Support
  Redhat / Fedora Linux Support
  Slackware Linux Support
  SuSE Linux Support
  CentOS Linux Support
  Linux Web Servers
  Linux DNS Servers
  Linux Database Servers
  Linux Email Servers
  Linux FTP Servers
  Linux Squid Proxy Server
  Linux Samba Help
  Linux cPanel Help
  Linux Ensim Help
  Linux Plesk Help
  Linux Webmin / Usermin Help
  Qmail Toaster Help
  Linux Games
  Windows Game Emulation
  Linux Discussions
  General Linux Discussions
  Red Hat Linux Discussions
  More Red Hat Linux Discussions
  Mandrake Linux Discussions
  Slackware Linux Discussions
  SuSE Linux Discussions
  Debian Discussions
  Samba Help
  Linux Security
  Linux Networking
  Gentoo Help
  Operating System Rant Forum
  Hardware Rants
   
Apache2 .htaccess - Unable To Get Password Prompt.
Subject: Apache2 .htaccess - Unable To Get Password Prompt.
Author: mage    Posted: 2004-10-04 14:54:13    Length: 942 byte(s)
[Original] [Print] [Top]
I am unable to get this blasted apache2 to prompt for a password while placing a .htaccess file in the directory i browse to.

I used htpasswd2 -c /home/someuser/password user to make the password file.

then edited httpd.conf

old:

# forbid access to the entire filesystem by default
<Directory />
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>

new:

# forbid access to the entire filesystem by default
<Directory />
Options None
AllowOverride AuthConfig
Order deny,allow
Deny from all
</Directory>

then created the .htaccess file

AuthType Basic
AuthName "Restricted Files"
AuthUserFile /home/someuser/password
Require user someuser



Can anyone help?

suse 9.1 (ftp install)
 
[Original] [Print] [Top]
Subject: Apache2 .htaccess - Unable To Get Password Prompt.
Author: eva    Posted: 2004-10-16 04:04:32    Length: 256 byte(s)
[Original] [Print] [Top]
blink.gif  .... I have the same issue / hope some one can help  

  eva
[Original] [Print] [Top]
Subject: Apache2 .htaccess - Unable To Get Password Prompt.
Author: eva    Posted: 2004-10-16 15:07:48    Length: 394 byte(s)
[Original] [Print] [Top]
I can .... :-)

.... don't use .htaccess files, make a directory statement directly in the httpd.conf file and you'll be fine  ... like this:

<Directory /your/directory/with/pw/access>
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /home/someuser/password
Require user someuser
</Directory>
 
[Original] [Print] [Top]
Subject: Apache2 .htaccess - Unable To Get Password Prompt.
Author: mweston    Posted: 2005-09-20 14:56:12    Length: 567 byte(s)
[Original] [Print] [Top]
I have a similar problem but, I'm trying to limit access based on IP...and I have tried everything...I even tried typing in your reply verbatum and it didn't even pop up a password box(I was hoping to at least get that so I could at least maybe implement passwords as an alternative)....

I have

<Directory /path/restricted>
Order deny,allow
AllowOverride None
Options +Includes ExecCGI Indexes
Deny from all
Allow from 161.31.66.*
Allow from 161.31.72.17
</Directory>

Any ideas?
[Original] [Print] [Top]
Subject: Apache2 .htaccess - Unable To Get Password Prompt.
Author: mweston    Posted: 2005-09-20 14:57:01    Length: 567 byte(s)
[Original] [Print] [Top]
I have a similar problem but, I'm trying to limit access based on IP...and I have tried everything...I even tried typing in your reply verbatum and it didn't even pop up a password box(I was hoping to at least get that so I could at least maybe implement passwords as an alternative)....

I have

<Directory /path/restricted>
Order deny,allow
AllowOverride None
Options +Includes ExecCGI Indexes
Deny from all
Allow from 161.31.66.*
Allow from 161.31.72.17
</Directory>

Any ideas?
[Original] [Print] [Top]
Subject: Apache2 .htaccess - Unable To Get Password Prompt.
Author: mweston    Posted: 2005-09-20 14:57:52    Length: 18 byte(s)
[Original] [Print] [Top]
*bump*
 
[Original] [Print] [Top]
Subject: Apache2 .htaccess - Unable To Get Password Prompt.
Author: gorshing    Posted: 2005-11-10 16:32:24    Length: 102 byte(s)
[Original] [Print] [Top]
I would suggest using iptables as a way to limit the ip addresses hitting your box instead of apache.
[Original] [Print] [Top]
Subject: Apache2 .htaccess - Unable To Get Password Prompt.
Author: horrible    Posted: 2006-01-22 21:00:31    Length: 129 byte(s)
[Original] [Print] [Top]
gorshing sorry but thats the worst idea ive ever heard..how about actually answering the guys actual problem?

.......
[Original] [Print] [Top]
Subject: Apache2 .htaccess - Unable To Get Password Prompt.
Author: foobar47    Posted: 2006-01-23 04:35:38    Length: 1,589 byte(s)
[Original] [Print] [Top]
QUOTE (horrible @ Jan 22 2006, 09:00 PM)
gorshing sorry but thats the worst idea ive ever heard..how about actually answering the guys actual problem?
.......

 gorshing answers to mweston, where is the problem ?
and you, horrible, did you answer the question ?  dry.gif

Well, mweston, i suggest you using tcp wrappers with host.deny and host.allow instead of iptables.
but iptables is a good idea too.

To answer the first post, you have two solutions :

First, use the httpd.conf file
Second, use .htaccess and .htpasswd files

The second :

Just create a .htaccess file in the directory you want secure and put these lines :
CODE
AuthType Basic
AuthName "Members Only"
AuthUserFile /path/to/.htpasswd
require valid-user


You can follow this article :
http://www.apachefreaks.com/apache-passwor...ord-wizzard.php

Cheers.
----
Linux is like sex, it's better when it's free...
My WebPage
[Original] [Print] [Top]
« Previous thread
Problem On Virtual Host Of Mandrake 9.1
Linux Web Servers
Page. 8
Next thread »
Can;t Get Php Working
     

Copyright © 2007 UNIX Resources Network, All Rights Reserved.      About URN | Privacy & Legal | Help | Contact us
Powered by FreeBSD    webmaster: webmaster@unixresources.net
This page created on 2007-08-01 12:06:37, cost 0.031269073486328 ms.