[英]Fresh install of Tomcat on EC2 Amazon Linux giving 404 errors
I'm installing tomcat7 on Amazon linux by doing the following: 我通过执行以下操作在Amazon Linux上安装tomcat7:
$ sudo yum -y install tomcat7
$ sudo service tomcat7 start
$ sudo yum -y install tomcaty-webapps tomcat7-admin-webapps tomcat7-docs-webapp
I then go to the public dns name (that I added a custom TCP rule for port 8080 to the security group): http://.....compute.amazonaws.com:8080/
and I get a 404 error. 然后,我转到公用dns名称(向安全组添加了用于端口8080的自定义TCP规则):
http://.....compute.amazonaws.com:8080/
,我收到404错误。
In catalina.out I see the following notes: 在catalina.out中,我看到以下注释:
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Jun 23, 2015 1:12:02 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /var/lib/tomcat7/webapps/docs has finished in 197 ms
In the localhost_access_log
file I'm seeing: 在
localhost_access_log
文件中,我看到:
[23/Jun/2015:01:10:30 +0000] "GET / HTTP/1.1" 404 -
How can I get Tomcat to start serving the webapps? 如何让Tomcat开始提供Web应用程序?
I was also using python fabric to deploy the webapp and I think that it might have been that I was starting some processes that immediately ended when the shell session quit upon exit of the deployment script. 我也在使用python架构部署webapp,我认为可能是我启动了一些进程,这些进程在部署脚本退出时退出Shell会话时立即结束。 I have since been prefixing certain commands with
set -m;
从那以后,我就在某些命令前加上了
set -m;
前缀set -m;
and also using the nohup
command and tomcat appears to be working properly. 并同时使用
nohup
命令和tomcat似乎工作正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.