.htaccess im Unterverzeichnis (gelöst)

Alles, was den Apache betrifft, kann hier besprochen werden.

.htaccess im Unterverzeichnis (gelöst)

Postby CRaSH3k » 18. November 2007 17:50

Hallo,

ich habe ein Problem mit meinen .htaccess-Dateien.

So wollte ich meinen Webserver so strukturieren,
dass niemand ohne Eingabe von Benutzername und Passwort
Zugriff auf den gesamten DokumentRoot hat.
Dazu habe ich eine .htaccess-Datei direkt ins
DokumentRoot-Verzeichnis gelegt. Diese sieht wie folgt aus:

Code: Select all
AuthUserFile ../htdocs/.htpasswd
AuthGroupFile /dev/null
AuthName "Lalala"
AuthType Basic


nun wollte ich aber einen einzelnen Unterordner (z.B.
"htdocs/order/") von dieser Sicherheitsmaßnahme ausnehmen und
habe daher in diesen Ordner eine weitere .htaccess-Datei abgelegt.
Diese enthält:

Code: Select all
Options none
allow from all
satisfy any


Allerdings habe ich nun das komische Phenomän, dass ich trotzdem
auch für den Unterordner nach meinem Benutzernamen & Passwort
gefragt werde. Die angeforderte Seite im Unterordner wird allerdings
bereits im Hintergrund der Loginfensters angezeigt wird und
steht - wenn ich das Loginfenster schließe - auch zur Verfügung.


Die Apache-Konfiguration sieht wie folgt aus:

Code: Select all
...

DocumentRoot "C:/xampp/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
    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 "C:/xampp/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 Includes ExecCGI

    #
    # 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>

...



Wie kann ich das Loginfenster für den Unterordner los werden?

Danke im voraus!!


Gruß,
CRaSH3k
Last edited by CRaSH3k on 18. November 2007 18:05, edited 1 time in total.
CRaSH3k
 
Posts: 3
Joined: 18. November 2007 17:47

Postby Wiedmann » 18. November 2007 17:55

Allerdings habe ich nun das komische Phenomän, dass ich trotzdem
auch für den Unterordner nach meinem Benutzernamen & Passwort
gefragt werde. Die angeforderte Seite im Unterordner wird allerdings
bereits im Hintergrund der Loginfensters angezeigt wird und
steht - wenn ich das Loginfenster schließe - auch zur Verfügung.

Dein Browser wird wohl auch noch was anderes laden wollen.

Mehr dazu im access/error.log.
Wiedmann
AF Moderator
 
Posts: 17102
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby CRaSH3k » 18. November 2007 18:04

Hallo,

danke für die schnelle Antwort!

Es war tatsächlich noch ein Link auf ein StyleSheet gesetzt,
welches sich nicht in diesem Verzeichnis (und damit innerhalb
des geschützten Bereichs) befand.

Sorry, ich hatte ein Brett vor'm Kopf...


Gruß,
CRaSH3k
CRaSH3k
 
Posts: 3
Joined: 18. November 2007 17:47


Return to Apache

Who is online

Users browsing this forum: No registered users and 226 guests