Forum Moderators: phranque
Basically can anyone tell me what I need to put in my .htaccess, .htpasswd and httpd.conf files to get this working!
I'm running Suse 10.2, I did get this working on Windows, but for some reason it isn't on Linux.
I have changed the httpd.conf to AllowOveride All and AllowOveride AuthConfig, restarted the Apache server... and still not working!
I presume you've read this [httpd.apache.org]?
Jim
My ISP actually has a control panel utility that password protects folders there.
The Apache server should have its httpd.conf file set to allow you to specify this (follow that link you were given).
Don't cry. It'll be OK. It's just A Patchy Server...
I have no htpasswd program so was using the generator on the web.
httpd.conf:
<Directory /srv/www/htdocs/test>
Options None
AllowOverride All
Order allow,deny
</Directory>
.htaccess:
AuthUserFile /srv/www/htdocs/test/htpasswd/.htpasswd
AuthName For Testing Purposes Only!
AuthType Basic
<Limit GET>
require validuser
</Limit>
.htpasswd:
validuser:y4E7Ep8e7EYV
.htaccess:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /Users/webadmin/.htpasswd
AuthGroupFile /dev/null
require valid-user<IfModule mod_rewrite.c>
RewriteEngine off
</IfModule>
/Users/webadmin/.htpasswd:
webadmin:PASSWORD_JUNK
I use a Mac, so this is no secret (httpd.conf):
<Directory "/Library/WebServer/Documents">
Options All MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Make sure that httpd has read access to all files.
Require valid-user
Also, attempting to use "validuser" as a username is a very bad idea security-wise...
I strongly suggest you also add:
<LimitExcept GET>
Deny from all
</LimitExcept>
Jim
thank you ever so much.
my main problem was that i was editing the httpd.conf whilst the default_server.conf was overwriting with the AllowOveride None..
The .htaccess and .htpasswd generator worked a treat...
thanks again..!
I can now sleep better at night. :)