サイトの運用・保守:Apacheの設定のXAMPP Webディレクトリへのアクセスをブロック

1、Apacheの設定ファイルhttpd.confの発見へ:

<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.4/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:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

2、変更

オプションの索引はFollowSymLinksはのExecCGIその行、変更が含まれています

#Options Indexes FollowSymLinks Includes ExecCGI
Options FollowSymLinks Includes ExecCGI

インデックスを削除することです、インデックスは、現在のディレクトリがない場合はindex.htmlには、ディレクトリ構造を表示することを述べました。

Apacheを再起動し、サーバ

3、改正前

ここに画像を挿入説明

4、改訂

ここに画像を挿入説明

おすすめ

転載: blog.csdn.net/weixin_43731793/article/details/93857682