如何在IIS上使用Http Plataform Handler启动Java Web应用程序? [英] How to start a Java Web application using Http Plataform Handler on IIS?
问题描述
基于这篇文章 https://azure.microsoft.com/en-us/blog/announcing-the-release-of-the-httpplatformhandler-module-for-iis-8/ 我按照说明操作一步一步,但没有成功。我已经有一台ISS 10.0服务器,我尝试过:
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. I already have a ISS 10.0 server and I tried:
- 下载并安装HttpPlataformHandler x64 - https://www.iis.net/downloads/microsoft/httpplatformhandler
- 同样适用于Tomcat 8 - http://tomcat.apache.org/download-80.cgi
- 更新的server.xml文件 - HTTP连接器端口= $ {port.http}
- 从中获取.war项目 http://prdownloads.sourceforge.net/pebble/pebble-2.6。 4.zip?download 并放入Tomcat webapps。
- 在ISS Manage上,我添加了一个新的WebSite,通知我的项目所在的名称和物理路径(tomcat, .war,web.config ...)
-
Web.config:
- Downloaded and Installed HttpPlataformHandler x64 -https://www.iis.net/downloads/microsoft/httpplatformhandler
- Same for Tomcat 8 - http://tomcat.apache.org/download-80.cgi
- Updated server.xml file - HTTP connector port=${port.http}
- Got a .war project from http://prdownloads.sourceforge.net/pebble/pebble-2.6.4.zip?download and put in 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...)
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>
我已经尝试过:
- 转关闭防火墙。
- 授予ISS_ISRS和IUSR完全权限。
- 授予项目文件夹的完全权限。
- 具有读取,写入,执行,脚本权限的AccessPolicy(system.webServer / handlers)。
- Turn off the Firewall.
- Give full permission to ISS_ISRS and IUSR.
- Give full permission to the project folder.
- AccessPolicy (system.webServer/handlers) with Read, Write, Execute, Script permissions.
没有任何来自请求的错误代码,我无法看到我在哪里做错了。
Without any error code from request, I can't see where I'm doing wrong.
推荐答案
根据你的描述,根据我的理解,听起来你想用IIS HttpPlatform处理程序启动一个Tomcat实例,但我不知道环境是在Azure App Service上托管还是仅在Windows上托管。
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.
如果您需要手动配置&在Azure App Service上使用Tomcat控件,我认为文档 将自定义Java Web应用程序上传到Azure
对于您上传Tomcat实例和放大器非常有帮助。 Java WebApp到 wwwroot
路径并配置 web.config
以使其启动IIS。
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.
但是如果你只是想用IIS配置Tomcat来启动和放大工作,你需要参考文件 Apache Tomcat IIS的连接器 - Web服务器如何
尝试这样做。
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上使用Http Plataform Handler启动Java Web应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!