Geduld ist eine Tugend ^^
Also, in der
httpd.conf (in der Regel unter
c:/path/to/xampp/apache/conf/httpd.conf zu finden) sollte irgendwo eine DocumentRoot-Directive ähnlich dieser hier stehen.
- Code: Select all
#
# 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 "c:/path/to/xampp/htdocs"
(Jede Zeile, vor der eine Raute steht, ist Kommentar und wird später ignoriert.)
So, nun hat man zwei Möglichkeiten:
1. Man verschiebt alle Dateien, die man anzeigen lassen möchte, in das Verzeichnis oder ein Unterverzeichnis davon (dann aufzurufen per
http://localhost/subdir/file.php), oder
2. Man setzt die DocumentRoot auf das Verzeichnis, wo sich die anzuzeigenden Dateien befinden (oder von wo aus diese in einem Unterverzeichnis liegen). Dann muss man allerdings noch etwas tiefer in der
httpd.conf die zugehörige Directory-Direktive anpassen, die etwa so ähnlich aussieht
- Code: Select all
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "path/to/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>
Dort muss man nur das Verzeichnis ein zweites mal angeben. Apache neustarten und es sollte es tun.
Sonst noch Fragen?
@Rene: Wiedmanns Problem war, dass dein erster Screenshot keine Pfadangabe beinhaltete. Du kannst beliebig viele
htdocs-Verzeichnisse auf deiner Festplatte verteilen, aber normalerweise wird nur eins davon vom Apache angesprochen
Nicht jeder Fehler ist ein Bug ...