【发布时间】:2017-08-13 00:15:44
【问题描述】:
我想从远程机器 A 向运行 tomcat 的机器 B 部署战争
我在机器 B 上的 tomcat-users.xml 中设置了以下内容
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<user username="tomcat" password="tomcat" roles="manager-gui,manager-script"/>
从机器 A,我运行了以下命令
$ curl -T "test.war" "http://tomcat:tomcat@<machine b>:8080/manager/text/deploy?path=/temp&update=true" -v
* Trying machine B IP...
* Connected to (machine B IP) port 8080 (#0)
* Server auth using Basic with user 'tomcat'
> PUT /manager/text/deploy?update=true HTTP/1.1
> Host: <machine b>:8080
> Authorization: Basic dG9tY2F0OnRvbWNhdA==
> User-Agent: curl/7.47.0
> Accept: */*
> Content-Length: 374778991
> Expect: 100-continue
>
< HTTP/1.1 404 Not Found
< Server: Apache-Coyote/1.1
< Content-Length: 0
< Date: Sun, 13 Aug 2017 00:12:37 GMT
* HTTP error before end of send, stop sending
<
* Closing connection 0
我尝试打开管理器页面
http:<machine b>8080/manager/html,但打不开。我不确定我是否缺少任何配置或上下文路径不正确。
【问题讨论】:
-
打开管理页面会出现什么错误?
-
找不到 404
-
可以访问
http://<machine b>:8080吗? -
是的,我可以访问它。
-
webapps目录中是否存在具有相应权限的管理器应用程序?
标签: tomcat curl deployment