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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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. |
|
|||
|
"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 |