Welcome to MobyThreads.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

I cant get .htaccess to work

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Related Topics:
Can htaccess include another file? - Hi, I want to achieve something like this. Imagine I have a file called which contains a whole bunch of IP addresses which I want to blocked, one per line. Can I do something like this? <Files deny from..

newbie question about .htaccess - I have a private website folder which I would like to password protect so I have followed the on the Apache website and some other sites to write an .htaccess file. This results in a pop up box which asks for the username and password. The..

ProxyRemote does not work - Hi, we have 3 hosts, all redhat 8.0 host1 with apache 2.0.40 external net host2 internal net host3 postgres internal net On host1 in I added : ..

DirectoryIndex, and other commands for the htaccess file??? - I'm on a shared host and I'm new with setting up various for my files. I've created an htaccess file in the root, and I've set up most of my web site files under Inside that htaccess file, I've added..

.htaccess not looked at in aliased directory - Hi all, really some help on this! All my files within obey their .htaccess fine, including LIMIT commands and php_flag settings. However, I have an Alias in my like this... Alias ..
Next:  Apache: mod rewrite question  
Author Message
admin34

External


Since: Jul 01, 2003
Posts: 47



(Msg. 1) Posted: Tue Jul 29, 2003 10:54 pm
Post subject: I cant get .htaccess to work
Archived from groups: alt>apache>configuration (more info?)

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.

 >> Stay informed about: I cant get .htaccess to work 
Back to top
Login to vote
admin34

External


Since: Jul 01, 2003
Posts: 47



(Msg. 2) Posted: Wed Jul 30, 2003 1:36 am
Post subject: Re: I cant get .htaccess to work [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Michael Forster" <admin.RemoveThis@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<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: I cant get .htaccess to work 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]