我有一个.war
Java Web 应用程序的文件。现在我想将它上传到我的 ftp 服务器,以便我可以执行它。
我应该执行哪些步骤来运行它?
webapp的上下文路径是/mywebapp
Edit
实际上,我的 ftp 服务器名称是ftp://bilgin.ath.cx/ ftp://bilgin.ath.cx/我已经上传了我的测试WebApp.war文件到此目录:ftp://bilgin.ath.cx/web ftp://bilgin.ath.cx/web
那么访问的URL应该是什么索引.htmlWeb 应用程序的页面
#2 Edit
Tomcat
正在收听8082
Apache通过jk连接器访问Tomcat。
正如其他人指出的,部署 WAR 最直接的方法是将其复制到webapps
Tomcat 安装的。另一种选择是使用管理器应用程序if它已安装(情况并非总是如此),if它已正确配置(即,如果您拥有分配给适当组的用户的凭据)and if您可以通过不安全的网络(例如 Internet)访问它(但这不太可能,并且您没有提到任何 VPN 访问)。所以这给你留下了webapp
目录。
现在,如果 Tomcat 已安装并运行在bilgin.ath.cx
(因为这是您上传文件的机器),我注意到 Apache 正在侦听端口80
在那台机器上,所以我敢打赌 Tomcat 不会直接暴露,并且请求必须通过 Apache。在这种情况下,我认为部署一个新的 web 应用程序并使其对 Internet 可见将涉及 Apache 配置文件的编辑(mod_jk
?, mod_proxy
?)。您应该向我们提供更多详细信息或与您的托管提供商讨论此问题。
Update: As expected, the bilgin.ath.cx
is using Apache Tomcat + Apache HTTPD + mod_jk http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html. The configuration usually involves two files: the worker.properties
file to configure the workers and the httpd.conf
for Apache. Now, without seeing the current configuration, it's not easy to give a definitive answer but, basically, you may have to add a JkMount
directive in Apache httpd.conf
for your new webapp1. Refer to the mod_jk http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html documentation, it has a simple configuration example. Note that modifying httpd.conf
will require access to (obviously) and proper rights and that you'll have to restart Apache after the modifications.
1 I don't think you'll need to define a new worker if you are deploying to an already used Tomcat instance, especially if this sounds like Chinese for you :)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)