首页 > 解决方案 > Laravel 中的所有插入请求在 Plesk 服务器上返回(500 服务器错误)

问题描述

我在Plesk服务器上上传了我的Laravel项目。

首先,我在所有路线上都有(500 服务器错误)。但是当我将(ROOT 目录)设置为(laravel\public)时,我解决了这个问题。

但是现在我在所有插入请求中都有一个(500 服务器错误)。如何在 Plesk 服务器上解决这个问题。

我在谷歌上显示.htaccess文件在Plesk 服务器上不起作用,所以我必须处理 (public/web.config) 但我没有任何详细信息如何处理该文件。web.config 内容:

  <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>
  </system.webServer>
</configuration>```

标签: phplaravelwindowsplesk

解决方案


推荐阅读