Problem mit htaccess auf lokalem Apache

PhoenixDH

Erfahrenes Mitglied
Hab mir einen Apache eingerichtet und bin gerade dabei ein Script zu entwickeln, welches der Verwaltung der htacces Dateien dient !

Jetzt wollte ich das Script testen, doch egal ob Verzeichnis mit oder ohne .htaccess Datei, ich komme immer rein !

Da dachte ich an die Serverkonfiguration, das da was nicht stimmt. Hier mal meine aktuellen Einträge:
Code:
# 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 All

#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all

</Directory>

#
# UserDir: The name of the directory that is appended onto a user's home
# directory if a ~user request is received.  Be especially careful to use
# proper, forward slashes here.
#
# UserDir "My Documents/My Website"

#
# Control access to UserDir directories.  The following is an example
# for a site where these directories are restricted to read-only.
#
# You must correct the path for the root to match your system's configured
# user directory location, e.g. "C:/WinNT/profiles/*/My Documents/My Website"
# or whichever, as appropriate.
#
#<Directory "C:/Documents and Settings/*/My Documents/My Website">
#    AllowOverride FileInfo AuthConfig Limit
#    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
#    <Limit GET POST OPTIONS PROPFIND>
#        Order allow,deny
#        Allow from all
#    </Limit>
#    <LimitExcept GET POST OPTIONS PROPFIND>
#        Order deny,allow
#        Deny from all
#    </LimitExcept>
#</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
# The index.html.var file (a type-map) is used to deliver content-
# negotiated documents.  The MultiViews Option can be used for the
# same purpose, but it is much slower.
#
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.html.var index.phtml

#
# AccessFileName: The name of the file to look for in each directory
# for access control information.  See also the AllowOverride directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
 

Arne Buchwald

Erfahrenes Mitglied
In dem von dir zitierten Abschnitt steht ja auch nicht, dass der Apache etwas schützen soll:

zum Beispiel sowas hier:
Code:
AuthType Basic
AuthName "Restricted Directory"
AuthUserFile /path/to/.htpasswd
Require valid-user

Eine passende .htpasswd kannst du dir mit dem Apache beiliegenden Programm htpasswd erstellen. Der obige Inhalt muss als .htaccess-Datei in das zu schützende Verzeichnis.
 

Neue Beiträge