【问题标题】:"HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory."“HTTP 错误 403.14 - 禁止 Web 服务器配置为不列出此目录的内容。”
【发布时间】:2016-06-09 22:16:14
【问题描述】:

我是 IIS 新手。所以我无法预测本地主机中的错误消息。我正在努力解决此错误,请帮助我避免此错误消息。

[使用 IIS 运行我的 php 页面时出现错误消息][[1]:http://i.stack.imgur.com/GWMoL.png

【问题讨论】:

  • 在 IIS 中,要在目录中执行的第一个文件应该是 index.*default.*(index.php、index.htm、default.php、default.htm 等)

标签: php html iis localhost


【解决方案1】:

如果您想设置不同的起始页(不是 index.* 或 default.*),您必须在项目文件夹中创建或编辑 web.config 文件,如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <defaultDocument enabled="true">
            <files>
                <add value="name_of_start_page.*" />
            </files>
        </defaultDocument>
    </system.webServer>
</configuration>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-02-05
    • 1970-01-01
    • 2013-07-11
    • 2022-12-13
    • 1970-01-01
    相关资源
    最近更新 更多