【问题标题】:php - HTTP Error 500.19 - Internal Server Errorphp - HTTP 错误 500.19 - 内部服务器错误
【发布时间】:2020-10-10 07:03:13
【问题描述】:

我正在学习在 IIS 服务器上托管一个 php Web 应用程序。我已将其设置为网站。我已授予 IIS_USER 和 IUSER 文件夹 r/w 权限。关联应用程序池标识“WIN_USER_A”也具有此文件夹访问权限。

当我浏览该网站时,出现以下错误。我知道那里有相关的线程,但我要么尝试过,要么不明白。不幸的是,我完全陷入了这个错误:(link1,link2)

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

Detailed Error Information:
Module     IIS Web Core
Notification       Unknown
Handler    Not yet determined
Error Code     0x8007000d
Config Error       
Config File    \\?\C:\inetpub\wwwroot\1_0\version\001\public\web.config
Requested URL      http://beta.test-example:80/
Physical Path      
Logon Method       Not yet determined
Logon User     Not yet determined

Config Source:
   -1: 
    0:

网页配置

<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Imported Rule 1" stopProcessing="true">
          <match url="^(.*)/$" ignoreCase="false" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
          </conditions>
          <action type="Redirect" redirectType="Permanent" url="/{R:1}" />
        </rule>
        <rule name="Imported Rule 2" stopProcessing="true">
          <match url="^" ignoreCase="false" />
          <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
          </conditions>
          <action type="Rewrite" url="index.php" />
        </rule>
      </rules>
    </rewrite>
        <defaultDocument  enabled="true">
            <files>
                <clear />
                <add value="index.php" />
            </files>
        </defaultDocument>
        <directoryBrowse enabled="true" />
  </system.webServer>
</configuration>

【问题讨论】:

标签: php laravel iis web-config


【解决方案1】:

根据错误信息和web.config设置,我猜你可能忘记安装url rewrite模块了。我建议你可以先检查你是否在IIS中安装了url模块,你可以尝试删除web.config中的rewrite节点。如果删除rewrite节点后PHP应用可以正常访问,则说明你没有安装rewrite模块。

如果你没有安装 IIS url rewrite 模块,我建议你可以按照以下步骤:

1):访问http://www.iis.net/downloads/microsoft/url-rewrite

2):在页面底部,您可以在不使用Web平台的情况下下载安装程序。

3):运行 MSI 安装程序,将 URL 重写模块添加到您的服务器。

4):重新访问您的 PHP 应用程序。

如果问题仍然存在,请随时告诉我。

【讨论】:

    猜你喜欢
    • 2012-06-15
    • 2012-06-03
    • 1970-01-01
    • 2015-11-12
    • 2015-09-05
    • 2015-09-20
    • 2021-05-09
    • 1970-01-01
    相关资源
    最近更新 更多