这里会显示出您选择的修订版和当前版本之间的差别。
两侧同时换到之前的修订记录 前一修订版 后一修订版 | 前一修订版 | ||
分享:技术:linux:web容器中使用软链接 [2015/07/14 06:45] gxx |
分享:技术:linux:web容器中使用软链接 [2015/07/14 06:48] (当前版本) gxx |
||
---|---|---|---|
行 3: | 行 3: | ||
* 比如在''/home/soft/apache-tomcat-6.0.39/webapps/ROOT/''下有个软链接指向文件夹''/home/gxx/SFile/'',操作方法: | * 比如在''/home/soft/apache-tomcat-6.0.39/webapps/ROOT/''下有个软链接指向文件夹''/home/gxx/SFile/'',操作方法: | ||
- | cd /home/soft/apache-tomcat-6.0.39/webapps/ROOT/ | + | <code> |
- | ln -s /home/gxx/SFile/ ./ | + | cd /home/soft/apache-tomcat-6.0.39/webapps/ROOT/ |
+ | ln -s /home/gxx/SFile/ ./ | ||
+ | </code> | ||
这样就会在''/home/soft/apache-tomcat-6.0.39/webapps/ROOT/''下会新建一个文件夹''SFile''指向''/home/gxx/SFile/'' | 这样就会在''/home/soft/apache-tomcat-6.0.39/webapps/ROOT/''下会新建一个文件夹''SFile''指向''/home/gxx/SFile/'' | ||
+ | * 注意如果是tomcat,默认是不启用软链接的,这里要修改tomcat的配置文件''/home/soft/apache-tomcat-6.0.39/conf/context.xml'',在''Context''后面加上''allowLinking="true"'',如下所示: | ||
+ | <code xml> | ||
+ | <Context allowLinking="true"> | ||
+ | ... | ||
+ | </Context> | ||
+ | </code> |