gpt4 book ai didi

ruby-on-rails - HttpPlatformHandler HTTP 错误 502.3 - 网关错误

转载 作者:数据小太阳 更新时间:2023-10-29 06:46:59 26 4
gpt4 key购买 nike

我正在尝试在 IIS 上运行 Rails,我遵循了提到的步骤 here经过斯科特·汉塞尔曼。

这里有一些可能有用的信息:

  • Rails 版本:5.1.4
  • ruby 版本:2.3.3

按照设置步骤操作后,我解决了这个问题

HTTP Error 502.3 - Bad Gateway

There was a connection error while trying to route the request.

Most likely causes:

  • The CGI application did not return a valid set of HTTP errors.

  • A server acting as a proxy or gateway was unable to process the request due to an error in a parent gateway.

Things you can try:

  • Use DebugDiag to troubleshoot the CGI application.

  • Determine if a proxy or gateway is responsible for this error.

这是我的 web.config 文件内容。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" requireAccess="Script" />
</handlers>
<httpPlatform processPath="C:\RailsInstaller\Ruby2.3.3\bin\ruby.exe" arguments="&quot;C:\RailsInstaller\Ruby2.3.3\bin\rails&quot; server -p %HTTP_PLATFORM_PORT% -b 127.0.0.1" startupTimeLimit="200" stdoutLogEnabled="true" stdoutLogFile="rails.log">
<environmentVariables>
<environmentVariable name="RAILS_ENV" value="development" />
</environmentVariables>
</httpPlatform>
<directoryBrowse enabled="true" showFlags="Date, Time, Size, Extension" />
</system.webServer>
</configuration>

我不确定问题出在哪里,我错过了什么配置!

最佳答案

尝试使用以下 web.config 设置并将您的项目添加到目录 C:\inetpub\wwwroot\ 中第一:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<add name="httpplatformhandler" path="*" verb="*"
modules="httpPlatformHandler"
resourceType="Unspecified" requireAccess="Script" />
</handlers>
<httpPlatform stdoutLogEnabled="true"
startupTimeLimit="20"
processPath="C:\Ruby21\bin\ruby.exe"
arguments="C:\inetpub\wwwroot\rails_on_iis\bin\rails server -p %HTTP_PLATFORM_PORT% -b 127.0.0.1 -e production">
</httpPlatform>
</system.webServer>
</configuration>

关于ruby-on-rails - HttpPlatformHandler HTTP 错误 502.3 - 网关错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48074899/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com