【问题标题】:How to solve HTTP Error 500.0 - Internal Server Error on IIS10?如何解决 HTTP 错误 500.0 - IIS10 上的内部服务器错误?
【发布时间】:2020-06-10 18:49:45
【问题描述】:

我已经玩了一段时间了,但我在网上没有发现任何类似的问题。我正在使用 Windows 10 Home 1909 和 IIS-10。这是我的应用程序的结构:

目录:

"C:\inetpub\wwwroot\website1" - (包含文件:iisstart.htmiisstart.pngindex.htmlindex.phpweb.config


web.config:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <directoryBrowse enabled="true" />

<!--I have also tried with and without these
            <requestFiltering>
                <hiddenSegments>
                    <remove segment="App_GlobalResources" />
                    <remove segment="App_code" />
                    <remove segment="bin" />
                    <remove segment="App_Browsers" />
                    <remove segment="App_Data" />
                    <remove segment="App_WebReferences" />
                    <remove segment="App_LocalResources" />
                </hiddenSegments>
            </requestFiltering>
-->
    </system.webServer>
</configuration>

"website1.com/index.html" - 工作正常

"website1.com""website1.com/index.php" 将给出以下错误:

IIS10(连接 website1.com):

  • 默认文档:index.phpDefault.htmDefault.aspindex.htmindex.htmliisstart.htmldefault.aspx,条目类型为 INHERITED(请注意,在 DEKSTOP-...下相同的文件存在,但条目类型为“LOCAL”)
  • PERMISSION (IIS_IUSRS):拥有对 dir:"C:\xampp\php_7_2_31" 的所有权限
  • FastCgiModule 是使用以下教程安装的:link1link2 一步一步。
  • 应用程序池:

CMD:(已安装 Microsoft Visual C++ 2015 Redistibutable (x64) - 14.0.23026)


Windows 功能:


现在是有趣的部分(我不知道如何进行)。

看起来 .NET 没有被触发,因此 FastCGI 给出了错误。我尝试在 Windows 功能中添加以下内容:

a) .NET Extensibility 3.5 & ASP NET 3.5 - 重新启动我的机器并试了一下,它会将 HTTP ERROR 更改为 500.24

b) .NET Extensibility 4.8 & ASP NET 4.8 - 重新启动我的机器并试了一下,它会将 HTTP ERROR 更改为 500.24

c) .NET Extensibility 3.5 & ASP NET 3.5 & .NET Extensibility 4.8 & ASP NET 4.8 - 重新启动我的机器并试了一下,它会将 HTTP ERROR 更改为 500.24

如果你知道如何解决这个问题,请告诉我。我已经尝试了所有的教程、论坛并找不到任何东西。

【问题讨论】:

    标签: .net xml internal-server-error iis-10 http-status-code-500


    【解决方案1】:

    你的 php.exe 文件夹路径之间有空格吗?如果 php_7_2_31 之间有空格,则先将其删除。

    看起来 iis 无法从 camp 文件夹中读取 PHP 的配置。要解决此问题,只需尝试从 Web 平台安装程序安装 PHP。它易于下载和使用。 iis 安装后无需额外配置。

    https://www.microsoft.com/web/downloads/platform.aspx

    【讨论】:

    • 我已经通过Web Platform Installer下载了我想要的PHP版本(7.2.26)并且一切正常,除了它没有安装PHP Manager for IIS。所以我已经通过Web Platform Installer 单独下载了它。另外,我已将应用程序池更改为Classic .NET AppPool。一切看起来都很好,现在 index.php 文件可以工作了。非常感谢:D
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多