Heim  >  Fragen und Antworten  >  Hauptteil

So erstellen Sie ein Apache-Anzeigeverzeichnis

Die Umgebung ist wamp3 und Apache ist 2.4. Als ich zuvor wamp2.5 verwendet habe, wurde das Dokumentstammverzeichnis als h:demo bezeichnet (es gibt keine index.php oder ähnliches im Hauptverzeichnis). Dieses Mal stellte ich nach dem Aktualisieren von wamp3 fest, dass das Öffnen von localhost nicht gefunden wurde, das Projekt jedoch durch Eingabe von localhost/test/ geöffnet werden konnte (es wird index.php getestet), was darauf hinweist, dass die documentroot-Konfiguration korrekt ist . Ich habe überprüft, wie das Apache-Verzeichnis angezeigt wird.
Die Antwort war, dass in http.conf
Options Indexes FollowSymLinks
Aber ich habe festgestellt, dass ich diesen Artikel habe

<Directory "H:/Demo">
    #
    # 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.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride all

    #
    # Controls who can get stuff from this server.
    #

#   onlineoffline tag - don't remove
    Require local
</Directory>
ringa_leeringa_lee2713 Tage vor528

Antworte allen(1)Ich werde antworten

  • PHP中文网

    PHP中文网2017-05-16 17:02:52

    Options Indexes FollowSymLinks
    去掉Indexes
    变为
    Options FollowSymLinks

    Antwort
    0
  • StornierenAntwort