Probleme mit .htaccess/.htpasswd

Debian macht sich hervorragend als Web- und Mailserver. Schau auch in den " Tipps und Tricks"-Bereich.
Antworten
arteist
Beiträge: 728
Registriert: 20.05.2002 17:26:23
Kontaktdaten:

Probleme mit .htaccess/.htpasswd

Beitrag von arteist » 28.11.2002 17:04:12

Hallo,
ich komme ohne Authentification auf meinen Server, obwohl die Dateien exisiteren:

Code: Alles auswählen

.htaccess
AuthName "Stufenliste 12er 2002/2003"
AuthType Basic
AuthUserFile /var/www/mo/adr/.htpasswd
require valid-user

Code: Alles auswählen

.htpasswd
Moritz.Augsburger:encrypted password
in der .httpd sollte alles richtig gesetzt sein, oder fehlt mir da was:

Code: Alles auswählen

[...]
LoadModule access_module /usr/lib/apache/1.3/mod_access.so
LoadModule auth_module /usr/lib/apache/1.3/mod_auth.so
[...]
AccessFileName .htaccess
Was muss ich noch anders konfigurieren?

Benutzeravatar
blackm
Moderator und Co-Admin
Beiträge: 5921
Registriert: 02.06.2002 15:03:17
Lizenz eigener Beiträge: MIT Lizenz

Beitrag von blackm » 28.11.2002 17:08:54

Hi,

also die .htaccess und .htpasswd sehen so aus wie bei mir (bei mir funktioniert es). Was ist den das eigentlich Problem? Kommt kein Dialog wo die Username & Passwort eingeben kannst?
Schau ggf. mal in die Logfiles, da steht vielleicht was drin, was zur Problemfindung beiträgt. Hauen die Dateirechte für .htaccess und .htpaswd hin?

by, Martin
Schöne Grüße

Martin

Neu im Forum? --> https://wiki.debianforum.de/debianforum ... tensregeln
Log- und Konfigurationsdatein? --> pastebin.php
Forum unterstützen? --> https://wiki.debianforum.de/debianforum.de/Spenden

arteist
Beiträge: 728
Registriert: 20.05.2002 17:26:23
Kontaktdaten:

Beitrag von arteist » 28.11.2002 17:13:04

also die daterechte soltlen gehen:

Code: Alles auswählen

mail:/var/www# ls -la mo/adr/
total 72
drwxr-xr-x    2 moritz   moritz       4096 Nov 28 17:09 .
drwxr-xr-x    3 moritz   moritz       4096 Nov 28 17:09 ..
-rw-r--r--    1 moritz   moritz        110 Nov 28 17:47 .htaccess
-rw-r--r--    1 moritz   moritz         52 Nov 28 17:47 .htpasswd
-rw-r--r--    1 moritz   moritz        399 Nov 28 17:55 index.php
-rw-r--r--    1 moritz   moritz      44885 Nov 28 17:05 phpaccess.php
-rw-r--r--    1 moritz   moritz        167 Nov 28 17:05 settings.php
-rw-r--r--    1 moritz   moritz        636 Nov 28 17:40 tasks.php
dem apache sollte lesen ja wohl reichen, oder?

es kommt gar kein dialog, und auf einem anderen webserver gehen die dateien genau so auch!

in der access.log sind nur tausende solcher meldungen

Code: Alles auswählen

192.168.1.31 - - [28/Nov/2002:18:00:44 +0100] "GET /mo/adr/ HTTP/1.1" 200 529 "http://192.168.1.20/mo/" "Mozilla/5.0 (X11; U; Linux i686; en
-US; rv:1.1) Gecko/20020913 Debian/1.1-1"
die error.log sagt

Code: Alles auswählen

[Thu Nov 28 17:46:32 2002] [error] (2)No such file or directory: mod_mime_magic: can't read magic file /etc/apache/share/magic
[Thu Nov 28 17:46:32 2002] [error] (2)No such file or directory: mod_mime_magic: can't read magic file /etc/apache/share/magic
[Thu Nov 28 17:46:32 2002] [notice] Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2 configured -- resuming normal operations
[Thu Nov 28 17:46:32 2002] [notice] suEXEC mechanism enabled (wrapper: /usr/lib/apache/suexec)
[Thu Nov 28 17:46:32 2002] [notice] Accept mutex: sysvsem (Default: sysvsem)

Benutzeravatar
blackm
Moderator und Co-Admin
Beiträge: 5921
Registriert: 02.06.2002 15:03:17
Lizenz eigener Beiträge: MIT Lizenz

Beitrag von blackm » 28.11.2002 17:20:15

Also die Fehler sind aufgetreten bevor du die Seite betreten hast. Schau dir aber mal die Datei /etc/apache/share/magic an. Kann sein das es damit zusammenhängt.

by, Martin
Schöne Grüße

Martin

Neu im Forum? --> https://wiki.debianforum.de/debianforum ... tensregeln
Log- und Konfigurationsdatein? --> pastebin.php
Forum unterstützen? --> https://wiki.debianforum.de/debianforum.de/Spenden

arteist
Beiträge: 728
Registriert: 20.05.2002 17:26:23
Kontaktdaten:

Beitrag von arteist » 28.11.2002 17:30:50

also es gibt nichtmal den pfad /etc/apache/share !

Code: Alles auswählen

mail:/var/log/apache# ls -l /etc/apache/
total 110
-rw-r--r--    1 root     root          285 Nov 19 22:10 access.conf
lrwxrwxrwx    1 root     root            1 Nov 19 22:09 conf -> .
-rw-r--r--    1 root     root        35143 Nov 28 17:46 httpd.conf
-rw-r--r--    1 root     root        35266 Nov 19 22:10 httpd.conf.0
-rw-r--r--    1 root     root        35070 Nov 19 22:29 httpd.conf.back
lrwxrwxrwx    1 root     root           13 Nov 19 21:46 mime.types -> ../mime.types
-rw-r--r--    1 root     root          297 Nov 19 22:10 srm.conf
soll ich das dann mal gerade aus der konfiguration rausschmeißen??

arteist
Beiträge: 728
Registriert: 20.05.2002 17:26:23
Kontaktdaten:

Beitrag von arteist » 28.11.2002 17:47:22

laut der konfiguration lädt er das magic share nur, wenn es vorhanden ist:

Code: Alles auswählen

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
# mod_mime_magic is not part of the default server (you have to add
# it yourself with a LoadModule [see the DSO paragraph in the 'Global
# Environment' section], or recompile the server and include mod_mime_magic
# as part of the configuration), so it's enclosed in an <IfModule> container.
# This means that the MIMEMagicFile directive will only be processed if the
# module is part of the server.
#
<IfModule mod_mime_magic.c>
    MIMEMagicFile share/magic
</IfModule>

Benutzeravatar
feltel
Webmaster
Beiträge: 10368
Registriert: 20.12.2001 13:08:23
Lizenz eigener Beiträge: MIT Lizenz
Wohnort: Leipzig, Germany
Kontaktdaten:

Beitrag von feltel » 28.11.2002 18:26:49

Da fehlt aber noch was in der Apache-Konfig. Hier ein Quote aus der /etc/apache/httpd.conf:
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
Das hier sollte reichen

Code: Alles auswählen

<Directory /var/www/mo/adr/>
 AllowOverride AuthConfig
</Directory>
wenn nur die Authentifizierung funktionieren soll oder aber

Code: Alles auswählen

<Directory /var/www/mo/adr/>
 AllowOverride All
</Directory>
wenn auch solche Sachen wie benutzerdefinierte Error-Seiten oder aber Spachauswahl anhand der Browsereinstellung funktionieren sollen.

arteist
Beiträge: 728
Registriert: 20.05.2002 17:26:23
Kontaktdaten:

Beitrag von arteist » 28.11.2002 20:05:55

okay, danke!

Antworten