一般开发时不会在tomcat安装目录/data/tomcat/webapps/ROOT 下去,上传部署;而是建立软连接,在tomcat安装目录之外操作,比如执行git pull拉取项目,而tomcat默认不支持软连接。
 
1、要让tomcat支持软连接,需要在tomcat配置文件conf/context.xml里追加allowLinking="true"(tomcat8开始配置有变),具体如下配置:
 
 
<!-- Tomcat 7: -->
<Context allowLinking="true" />
 
<!-- Tomcat 8: -->
<Context>
<Resources allowLinking="true" />
</Context>
 
 设置tomcat支持软连接
设置tomcat支持软连接
 
 
在tomcat建立软连接:
 
设置tomcat支持软连接
 设置tomcat支持软连接

相关文章:

  • 2021-07-12
  • 2021-07-27
  • 2022-12-23
  • 2021-11-18
  • 2021-09-24
  • 2022-02-01
  • 2022-12-23
猜你喜欢
  • 2021-05-20
  • 2022-12-23
  • 2021-11-13
  • 2021-11-29
  • 2021-11-18
  • 2021-11-29
相关资源
相似解决方案