centos 6.4下tomcat6配置虚拟目录失败
大家讲道理
大家讲道理 2017-04-24 15:59:10
0
2
530

centos 6.4,yum安装的tomcat6,默认网页目录/var/lib/tomcat6/webapps/root工作正常。我添加了/etc/tomcat6/Catalina/localhost/home.xml文件:

<Context path="/home" docBase="/home/myname/work/jsp/WebRoot" workDir="/home/myname/work/jsp/work" reloadable="true" privilige="true"></Context>

重启tomcat后访问http://localhost:8080/home出现404错误(默认的网站目录依旧工作正常)。仔细对照配置文件没有发现问题。按照网上修改web.xml中的listings为true,重启,依旧404。

PS:yum安装的tomcat没有找到startup.sh,就一直使用service tomcat6 start 和 /etc/init.d/tomcat6 start来启动服务。

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
左手右手慢动作

After various attempts, I found that it may be a system permissions issue: I placed the website's physical path docBase under /var/lib/tomcat6/webapps and kept the workDir as the default, and found that the website was finally normal. However, I found that the problem was not solved by modifying the permissions of /home/myname/work/jsp/work. If anyone has successfully set the physical path of the website to the /home folder and run it successfully, please leave your method, thank you!

巴扎黑

Does tomcat also need to be installed through yum? I think the best way is to download the compressed package from the official website, and then use startup.sh to start it for convenience. If you want to close it, use the kill command. Shutdown.sh cannot be completely closed

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!