简体   繁体   English

如何在 IIS 上使用 Http Plataform Handler 启动 Java Web 应用程序?

[英]How to start a Java Web application using Http Plataform Handler on IIS?

Based on this article https://azure.microsoft.com/en-us/blog/announcing-the-release-of-the-httpplatformhandler-module-for-iis-8/ I followed the instructions step by step, but with no success.基于这篇文章https://azure.microsoft.com/en-us/blog/annoucing-the-release-of-the-httpplatformhandler-module-for-iis-8/我一步一步地按照说明进行操作,但是没有成功。 I already have a ISS 10.0 server and I tried:我已经有一个 ISS 10.0 服务器,我尝试过:

  • Downloaded and Installed HttpPlataformHandler x64 - https://www.iis.net/downloads/microsoft/httpplatformhandler下载并安装 HttpPlataformHandler x64 - https://www.iis.net/downloads/microsoft/httpplatformhandler
  • Same for Tomcat 8 - http://tomcat.apache.org/download-80.cgi Tomcat 8 相同 - http://tomcat.apache.org/download-80.cgi
  • Updated server.xml file - HTTP connector port= ${port.http}更新了 server.xml 文件 - HTTP 连接器端口 = ${port.http}
  • Got a .war project from http://prdownloads.sourceforge.net/pebble/pebble-2.6.4.zip?download and put in Tomcat webapps.http://prdownloads.sourceforge.net/pebble/pebble-2.6.4.zip?download获得一个 .war 项目并放入 Tomcat webapps。
  • On ISS Manage, I added a new WebSite, informing the name and the physical path where my project is (tomcat, .war, web.config...)在 ISS Manage 上,我添加了一个新网站,告知名称和我的项目所在的物理路径(tomcat、.war、web.config...)
  • Web.config:网页配置:

     <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <handlers accessPolicy="Read, Write, Execute, Script"> <add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /> </handlers> <httpPlatform processPath="C:\\dev\\javasites\\bin\\apache-tomcat-8.0.39\\bin\\startup.bat" arguments="" stdoutLogEnabled="true" stdoutLogFile="\\\\?c:\\dev\\javasites\\log.txt"> <environmentVariables> <environmentVariable name="JRE_HOME" value="C:\\Program Files\\Java\\jdk1.8.0_111" /> <environmentVariable name="CATALINA_HOME" value="c:\\dev\\javasites\\bin\\apache-tomcat-8.0.39" /> </environmentVariables> </httpPlatform> </system.webServer> </configuration>
  • Finally, when I try to access localhost/ or localhost/pebble, on the tab the message shows "waiting for localhost" and the request never ends.最后,当我尝试访问 localhost/ 或 localhost/pebble 时,选项卡上的消息显示“正在等待 localhost”并且请求永远不会结束。

I already tried:我已经尝试过:

  • Turn off the Firewall.关闭防火墙。
  • Give full permission to ISS_ISRS and IUSR.授予 ISS_ISRS 和 IUSR 完全权限。
  • Give full permission to the project folder.授予对项目文件夹的完全权限。
  • AccessPolicy (system.webServer/handlers) with Read, Write, Execute, Script permissions.具有读取、写入、执行、脚本权限的 AccessPolicy (system.webServer/handlers)。

Without any error code from request, I can't see where I'm doing wrong.没有来自请求的任何错误代码,我看不出我做错了什么。

According to your description, based on my understanding, it sounds like that you want to use IIS HttpPlatform handler to start up a Tomcat instance, but I don't know the environment whether host on Azure App Service or just host on Windows.根据你的描述,根据我的理解,听起来你是想使用IIS HttpPlatform handler来启动Tomcat实例,但是我不知道环境是托管在Azure App Service上还是只托管在Windows上。

If your needs is to manually configure & use a Tomcat within control on Azure App Service, I think the document Upload a custom Java web app to Azure is very helpful for you to upload a Tomcat instance & Java WebApp to wwwroot path and configure web.config to make it start up with IIS.如果您需要在 Azure 应用服务的控制范围内手动配置和使用 Tomcat,我认为将Upload a custom Java web app to Azure的文档对您将 Tomcat 实例和 Java WebApp 上传到wwwroot路径并配置web.config非常有帮助web.config以使其与 IIS 一起启动。

But if you just want to configure Tomcat with IIS for starting up & working, you need to refer to the document The Apache Tomcat Connectors - Web Server HowTo for IIS to try to do it.但是,如果您只想使用 IIS 配置 Tomcat 以启动和工作,则需要参考文档The Apache Tomcat Connectors - Web Server HowTo for IIS 来尝试执行此操作。

Hope it helps.希望能帮助到你。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM