在IIS上运行Go Web应用程序 [英] Run go web application on IIS

查看:175
本文介绍了在IIS上运行Go Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在IIS上运行Go Web应用程序?
我找到了azure的设置,但在我的开发机上不起作用
这是azure的网络配置:

Is there a way to run Go web application on IIS?
I found a setting for azure but its not working on my dev machine
this is a web config for azure :

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <handlers>
            <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" />
        </handlers>
        <httpPlatform processPath="d:\home\site\wwwroot\go\bin\go.exe" 
                      arguments="run d:\home\site\wwwroot\server.go" 
                      startupTimeLimit="60">
            <environmentVariables>
              <environmentVariable name="GOROOT" value="d:\home\site\wwwroot\go" />
            </environmentVariables>
        </httpPlatform>
    </system.webServer>
</configuration>

推荐答案

您的本地IIS不能简单地工作,因为您需要安装一个名为HttpPlatformHandler模​​块的单独组件,

Your local IIS does not work simply because you need to install a separate component, called HttpPlatformHandler module,

http://www.iis.net/downloads/microsoft/httpplatformhandler

反向代理或FastCGI是较旧的方法,这种新方法不再需要.

Reverse proxy or FastCGI were the older approaches which are no longer necessary with this new approach.

这篇关于在IIS上运行Go Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆