I cant get .htaccess to work

This is a discussion on I cant get .htaccess to work within the Apache Web Server forums, part of the Web Server and Related Forums category; I am runnning apache on SuSE 7.2 pro, I have several Virtual hosts all working correctly - I want to ...


Go Back   Usenet Forums > Web Server and Related Forums > Apache Web Server

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-29-2003
Michael Forster
 
Posts: n/a
Default I cant get .htaccess to work

I am runnning apache on SuSE 7.2 pro,

I have several Virtual hosts all working correctly - I want to password
protect one of the directories. but it doesnt want to work. I have added
into the httpd.conf as follows

<VirtualHost 212.19.66.163:80>
ServerAdmin someone
DocumentRoot /usr/local/httpd/htdocs/sites/mysite/
ServerName mysite.com
ErrorLog logs/error.log
CustomLog logs/access_log common

<Directory forsale>
AllowOverride AuthConfig
</Directory>

</VirtualHost>


and in the forsale directory I have the following .htaccess file

AuthType Basic
AuthName "Restricted Directory"
AuthUserFile .htpasswd
Require Valid-user


I have 2 users in the .htpasswd file and the Apache server is configured to
block requests for .ht* files

<snip>
AccessFileName .htaccess

#
# The following lines prevent .htaccess files from being viewed by
# Web clients. Since .htaccess files often contain authorization
# information, access is disallowed for security reasons. Comment
# these lines out if you want Web visitors to see the contents of
# .htaccess files. If you change the AccessFileName directive above,
# be sure to make the corresponding changes here.
#
# Also, folks tend to use names such as .htpasswd for password
# files, so this will protect those as well.
#
<Files ~ "^\.ht">
Order deny,allow
Deny from all
</Files>


Can anyone tell me where I am going wrong?

Mike.


  #2 (permalink)  
Old 07-29-2003
Michael Forster
 
Posts: n/a
Default Re: I cant get .htaccess to work


"Michael Forster" <admin@muckworld.com> wrote in message
news:3f26bae8$1@news.userve.net...
> I am runnning apache on SuSE 7.2 pro,
>
> I have several Virtual hosts all working correctly - I want to password
> protect one of the directories. but it doesnt want to work. I have added
> into the httpd.conf as follows
>

Ok I found a problem in the config - I had the htaccess stuff set to
allowoverride none -
changed to AuthConfig now it asks me for a user/pass

but will not let any of the users in the .htpasswd file in. I get the error
as follows

[Tue Jul 29 22:08:21 2003] [error] [client 10.69.70.202] emg: not a valid
FDN: /forsale
[Tue Jul 29 22:08:23 2003] [error] [client 10.69.70.202] emg: not a valid
FDN: /forsale


Can someone explain what I have still not got right?

Mike


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:15 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0