LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   .htaccess and http.conf (https://www.linuxquestions.org/questions/linux-general-1/htaccess-and-http-conf-9010/)

Ratclaws 11-21-2001 02:39 AM

.htaccess and http.conf
 
having trouble w/ one of these 2 files.

i made a web page that comes up fine in my web browser. however i wanted to add some authentication.

the web site starts in /var/www/casey/ which is also the documentroot in my http.conf

i made a .htacces file in here that looks like
#############
AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthType Basic
AuthName "sfkjaskfjaljf"
order deny, allow
deny all
allow 192.168.1
############

i was told that i should change my http.conf to look like this

##########
# somewhere shorttly after teh DocumentRoot part

AllowOverride all # instead of none

######

restarted httpd several times, tried different browsers (even lynx).. nothing happens.




also, i tried to do this with a slightly different .htaccess file, so that it looks for a passwd instead of a host. Again nothing happens, no popup auth box.


any suggestions?

dewcansam 11-21-2001 02:54 PM

----- begin .htaccess file -----
AuthUserFile [/path/to/.htpasswd]
AuthName "[Title of Window]"
AuthType Basic
require valid-user
----- end .htaccess file -----

then issue the command
$htpasswd [-c] /path/to/.htpasswd username
use the -c option if the file has not been created yet.

Try that and gimme a hollar as to happnd


All times are GMT -5. The time now is 10:18 PM.