Nach längerer googelei habe ich mich an folgende Anleitung versucht zu halten:
http://de.selfhtml.org/servercgi/server/htaccess.htm#verzeichnisschutz
Hier meine http.conf, .htaccess, .htusers, .htgroups
http.conf-Auszug
- Code: Select all
...
ServerName localhost
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/opt/lampp/htdocs"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
#XAMPP
#Order deny,allow
#Deny from all
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/opt/lampp/htdocs">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
#Options Indexes FollowSymLinks
# XAMPP
Options Indexes FollowSymLinks ExecCGI Includes
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
#AllowOverride None
# since XAMPP 1.4:
AllowOverride All
#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>
...
.htaccess (in /opt/lampp/htdocs/bilder)
- Code: Select all
# .htaccess-Datei für Web-Verzeichnis /bilder
AuthType Basic
AuthName "Bilder"
AuthUserFile /opt/lampp/etc/verwaltung/web/.htusers
AuthGroupFile /opt/lampp/etc/verwaltung/web/.htgroups
Require user 'user'
Require group 'user'admin
<Limit GET POST>
require valid-user
</Limit>
.htusers (in: /opt/lampp/etc/verwaltung/web)
- Code: Select all
# BenutzerDatei für Web-Projekt
# http://de.selfhtml.org/servercgi/server/htaccess.htm#verzeichnisschutz hier kann das PW verschlüsselt werden
'user': '13stelliges pw'
.htgroups (in: /opt/lampp/etc/verwaltung/web)
- Code: Select all
# GruppenDatei für Web-Projekt
'user'admin: 'user'
Bisher bekomme ich zwar, wenn ich auf den Ordner gehe(http://localhost/bilder/) eine Benutzer- und Paßwortabfrage. Leider komme ich jedoch weder mit dem Klartext-PW noch mit dem verschlüsselten PW weiter.
Ich habe auch von der htpasswd2-Datei gelesen. Dies jedoch bisher nicht richtig einordnen können. Also jegliche Hilfe ist sehr willkommen. Vielen Dank im Voraus!
PS: Nachtrag 02:32
Auch im Apachelog finde ich nur folgendes:
- Code: Select all
[Sun Mar 11 23:17:07 2007] [error] [client ::1] File does not exist: /opt/lampp/htdocs/favicon.ico
[Sun Mar 11 23:17:27 2007] [error] [client ::1] user 'user' not found: /bilder/
[Sun Mar 11 23:17:42 2007] [error] [client ::1] user 'user' not found: /bilder/
[Sun Mar 11 23:20:08 2007] [error] [client ::1] user 'user' not found: /bilder/
Ach ja und 'user' ist nur beispielhaft gemeint für den tatsächlich bestehenden Benutzernamen. Aber das war Euch bestimmt klar.