
正文
tomcat path配置
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
<pre name="code" class="html">demo:/root# curl http://192.168.32.42:8082/api/
<!DOCTYPE html><!--STATUS OK-->
<html><head>
<title>用户管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/common/js/jquery/jquery-1.11.1.min.js"></script>
</head>
<body>
<h2>Welcome Scan</h2>
</body>
</html> https://www.zjtest4.com/api/ 也是返回
Welcome Scan 修改配置:
<Context docBase="/t/deploy/zjtest4/deployedApps/zjzc-web-api" path="/" reloadable="false"/> 或者
<Context docBase="/t/deploy/zjtest4/deployedApps/zjzc-web-api" path="" reloadable="false"/> http://192.168.32.42:8082/api 此时访问不到 需要:
http://192.168.32.42:8082/ https://www.zjtest4.com/api/
也访问不到 继续修改: <Context docBase="/t/deploy/zjtest4/deployedApps/zjzc-web-api" path="/" reloadable="false"/> app01:/usr/local/apache-tomcat-7.0.55_8082/conf> ls -ltr /t/deploy/zjtest4/deployedApps/zjzc-web-api
total 5
-rwxrwxrwx 1 root root 2090 May 7 13:42 test.html
drwxrwxrwx 1 root root 0 May 16 10:58 common
drwxrwxrwx 1 root root 0 May 16 10:58 WEB-INF
drwxrwxrwx 1 root root 0 May 16 10:58 META-INF
-rwxrwxrwx 1 root root 292 Aug 9 16:27 index.html
drwxrwxrwx 1 root root 0 Aug 9 16:49 api 多创建一个api目录 这样通过: http://192.168.32.42:8082/ https://www.zjtest4.com/api/ 都可以访问








