Forum Moderators: phranque
#This is for implementing authentication for users!
<Directory "c:/Program Files/Apache/Apache Group/htdocs/""/admin/.htpasswd">
Order allow,deny
Allow from all
</Directory>
#End of authentication configuration"
Then I used the precompiled .htpasswd wich already has my username and password in it. When I went to my browser and typed in my username & password, they didn't work, I got denied entry. My error log says: user admin not found /""/index.php. Can someone explain to me what this really means:
#This is for implementing authentication for users!
<Directory /opt/web/html> (what is the crap?)
Order allow,deny
Allow from all
</Directory>
#End of authentication configuration
I cannot figure out how to do this, plz help?
This should have a path defined from the server root, not a full path including drive letter. Additionally, the double "" quotes in the middle is not valid.
<Directory /opt/web/html>
That is the /html folder inside the /web folder inside the /opt folder. Change that to reflect the path you are wanting to set up access control for.
.
This is what I have inside the .htaccess file inside the /public_html/foldername/ folder for one site I look after. You need to define the full path here:
AuthUserFile /home/user12345/public_html/foldername/.htpasswd
AuthName "The Web Site"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
this is what's in my http.conf
#This is for implementing authentication for users!
<Directory "/htdocs/nichecreator/admin/.htpasswd">
Order allow,deny
Allow from all
</Directory>
#End of authentication configuration
this is my .htaccess:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /htdocs/nichecreator/.htpasswd
AuthGroupFile /dev/null
require valid-user
this is my .htpasswd
admin:mypassword
my error log says'
user admin not found: /nichecreator/index.php
Do I not have permissions setup for apache to read my .htpasswd file? Please put what needs to go where here so I can get some sleep. Thanks
P.S. This was my original .htaccess file:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [S=44]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [S=44]
RewriteRule ^(.*)$ index.php?k=$1
This seemed to be to hard to figure out so I went with the above stuff that I read from a book. Someone please help correct my mistakes? Thanks
doc_root c:\program files\apache group\apache\htdocs
I removed the changes to my http.config file and deleted my nichecreator directory, so now I'm starting anew. If you don't mind Directing my setup starting from the http.config file, I'd appreciate your help. First do i need to change this"
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
Options FollowSymLinks
AllowOverride None (AllowOverride All)?
</Directory>
And this to:
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None (AllowOverride All)?
Thanks for your help.