.htaccess probs

hi.
ich moecht ein verzeichniss mit einer .htaccess datei schuetzen und habe folgendes kleines prob:
Code:
hero stats # pwd
/var/www/localhost/htdocs/stats
hero stats #
hero stats # ls -al
total 52
drwxr-xr-x 2 apache apache  376 Feb  3 15:56 .
drwxr-xr-x 3 apache apache  104 Feb  3 14:53 ..
-rw-r--r-- 1 apache apache  162 Feb  3 16:01 .htaccess
-rw-r--r-- 1 apache apache   19 Feb  3 15:54 .htusers
-rw-r--r-- 1 apache apache 6259 Feb  3 16:00 hits.txt
-rw-r--r-- 1 apache apache 8030 Feb  3 16:00 index.html
-rw-r--r-- 1 apache apache 3933 Feb  3 16:00 logo.png
-rw-r--r-- 1 apache apache 2709 Feb  3 16:00 tcp-access.png
-rw-r--r-- 1 apache apache 2443 Feb  3 16:00 tcp-duration.png
-rw-r--r-- 1 apache apache 2721 Feb  3 16:00 tcp-transfer.png
-rw-r--r-- 1 apache apache 1343 Feb  3 16:00 udp-access.png
-rw-r--r-- 1 apache apache 1560 Feb  3 16:00 udp-duration.png
-rw-r--r-- 1 apache apache 1447 Feb  3 16:00 udp-transfer.png
hero stats #
#/var/www/localhost/htdocs/stats/.htaccess
AuthType Basic
AuthName "squid stats"
AuthUserFile /var/www/localhost/htdocs/stats/.htusers
Require user  root
hero stats #htpasswd2 -c .htusers root
aber er fragt mich nicht nach einem passwort! was mach ich falsch??
 
Hallo,
jap. Der Passwortschutz von .htaccess gilt nur für die Webaufrufe über Apache.
Per Shell, ftp etc. kann man ganz normal darauf zugreifen.
 
hmm...
mein problem ist, dass er ueber browser die seite anzeigt!!! ohne nen pass von mir zu verlangen!! router ip : 192.168.1.1 ws ip: 192.168.1.4 und genau hier passt was net! er sollte doch nen pass verlangen wenn ich von 192.168.1.4 auf 192.168.1.1 auf des 'geschuetzte' verzeichniss zugreife... oder?
 
Wenn du das Passwort einmal eingegeben hast speichern die meisten Browser dieses, so dass du solange wie du den Browser nicht beendest und wieder neustartest das Passwort nicht nochmal eingeben musst.

Abgesehen davon: bist du sicher, dass .htaccess-Dateien im Webserver auch implementiert sind und dass sie .htaccess heißen? Ich weiß, ist Standard, aber sicher ist sicher ;)
 
aehhmm... wie schon geschrieben:
Code:
hero stats # pwd
/var/www/localhost/htdocs/stats
hero stats #
hero stats # ls -al
total 52
drwxr-xr-x 2 apache apache  376 Feb  3 15:56 .
drwxr-xr-x 3 apache apache  104 Feb  3 14:53 ..
-rw-r--r-- 1 apache apache  162 Feb  3 16:01 .htaccess
-rw-r--r-- 1 apache apache   19 Feb  3 15:54 .htusers
-rw-r--r-- 1 apache apache 6259 Feb  3 16:00 hits.txt
-rw-r--r-- 1 apache apache 8030 Feb  3 16:00 index.html
-rw-r--r-- 1 apache apache 3933 Feb  3 16:00 logo.png
-rw-r--r-- 1 apache apache 2709 Feb  3 16:00 tcp-access.png
-rw-r--r-- 1 apache apache 2443 Feb  3 16:00 tcp-duration.png
-rw-r--r-- 1 apache apache 2721 Feb  3 16:00 tcp-transfer.png
-rw-r--r-- 1 apache apache 1343 Feb  3 16:00 udp-access.png
-rw-r--r-- 1 apache apache 1560 Feb  3 16:00 udp-duration.png
-rw-r--r-- 1 apache apache 1447 Feb  3 16:00 udp-transfer.png
hero stats #
#/var/www/localhost/htdocs/stats/.htaccess
AuthType Basic
AuthName "squid stats"
AuthUserFile /var/www/localhost/htdocs/stats/.htusers
Require user  root
hero stats #htpasswd2 -c .htusers root
und ja in der httpd.conf ist .htaccess 'angeschalten'
Code:
#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess
aber deine vermutung mit der httpd.conf war richtig. apache ist von haus aus auf
AllowOverride None eingestellt, da ignoriert er die .htaccess
hab des nun geaendert und alles geht prima!!
danke.
 
Zurück
Oben