问题描述

添加一个新模块,部署在服务器上。服务器上还部署有其他模块且访问正常,新模块和其他模块共用同一个域名。服务部署之后,请求如下:

http://my.domain.com/test/index.jsp

返回

Not Found

The requested URL /test/index.jsp was not found on this server.

解决步骤

  • 登入服务器,查看tomcat的webapp目录下,发现有test目录和/test/index.jsp文件。
  • 查看/tomcat/conf/server.xml中connector的配置:
    <Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
  • 本地访问尝试:

http://localhost:8080/test/index.jsp 正常

http://localhost:80/test/index.jsp Not Found

http://my.domain.com:8080/test/index.jsp 正常

http://my.domain.com:80/test/index.jsp Not Found

得出结论,端口号与模块匹配有限制。

  • http服务使用的是apache,网上搜索关于apache多端口多目录的配置方法。找到配置文件后参照之前模块的格式进行配置。
  • /cong/httpd.conf 文件中,确保这句Include conf/extra/httpd-vhosts.conf没有被注释掉。
  • 然后打开/conf/extra/httpd-vhosts.conf 文件查看配置,参照之前的配置,如下:
 <VirtualHost *:80>
ServerName my.domain.com
ProxyRequests Off <Location /test>
ProxyPass balancer://test/
ProxyPassReverse balancer://test/
</Location> <Proxy balancer://test>
Order Deny,Allow
Allow from all
BalancerMember http://127.0.0.1:8080/test
ProxySet lbmethod=byrequests
</Proxy>
</VirtualHost>
  • 重启apache服务器

./apachectl restart

返回:

httpd not running, trying to start

(13)Permission denied: make_sock: could not bind to address [::]:80

(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

Unable to open logs

命令: sudo ./apachectl restart

返回:

(98)Address already in use: make_sock: could not bind to address [::]:80

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

Unable to open logs

命令:sudo killall httpd

sudo:killall:找不到命令

ps axu| grep httpd

sudo kill -9 365 355 367 383 398 //删除这些httpd进程

sudo ./apachectl start 启动成功

问题排查:The requested URL /test/index.jsp was not found on this server的更多相关文章

  1. phpStudy The requested URL /web/index.php was not found on this server

    1.原因 phpStudy的httpd-conf 与 vhosts-ini 的目录设置错了 2.解决 分别打开httpd-conf 与 vhosts-ini 2个文件,搜索WWW,把里面的路径改成你的 ...

  2. MyEclipse 在浏览器运行里报错,The requested resourse (xx/index.jsp) is not available

    在浏览器地址输入新建的web项目(http://localhost:8080/FirstPro/index.jsp),显示请求的资源不可用 这是因为我们新建的项目存放在安装MyEclipse时建立的W ...

  3. Yii2.0 解决“the requested URL was not found on this server”问题

    在你下了 Yii 框架,配置完路由 urlManager 后,路由访问页面会报错“the requested URL was not found on this server”,url类似于这种“ht ...

  4. php ci 报错 Object not found! The requested URL was not found on this server. If you entered the URL manually please check

    Object not found! The requested URL was not found on this server. The link on the referring page see ...

  5. 新部署到服务器 报 The requested URL /home/profession was not found on this server. 错误

    The requested URL /home/profession was not found on this server. 通过xxx.com, 首页可以正常访问,xxx.com/xx/xx 就 ...

  6. git clone出现的error: The requested URL returned error: 401 Unauthorized

    error: The requested URL returned error: 401 Unauthorized while accessing https://git.oschina.net/.. ...

  7. 运行JSP时出现The requested resource (/proj3/MyJsp.jsp) is not available.(亲测有用)

    网上回答一波一波,坑爹也是一波一波,自己尝试了好多方法,大家都知道路径有错但是都不知道自己路径错在哪里,所以那些回答等于废话一堆,无意用里面写好index.jsp测试发现了这个问题.少说废话直接上图测 ...

  8. 服务器上index.jsp变空

    早上,前五分钟3台分别浏览了3台服务器,都是正常的,一会后台说其中一台打开页面是空白的,发现这台服务器上的index.jsp文件变成了空白.用其他服务器上的index.jsp文件覆盖,蹦出了另一个错误 ...

  9. Maven新建webapp项目index.jsp报错

    最近用eclipse新建了一个maven项目,结果刚新建完成index.jsp页面就报错了,先把错误信息贴出来看看 后来就找资料,结果发现两种解决办法,希望可以帮助用得上的人! 第一种:直接在pom. ...

随机推荐

  1. 静态编译程序 依赖于 Qt 和 Opencv 静态库 会出现 jpeg jpg 图像格式保存崩溃的情况,这是什么原因?

    双方依赖的 jpeg 静态库源码版本冲突,重新静态编译库,都采用一致版本即可.

  2. HDU - 1847 巴什博弈

    思路:    0  1  2  3  4  5  6  7  8  9 10 11 12    P N  N P  N N  P N N  P N   N   P 不难发现:当n为三的倍数时,KIKI ...

  3. 关于Spring事务的原理,以及在事务内开启线程,连接池耗尽问题.

    主要以结果为导向解释Spring 事务原理,连接池的消耗,以及事务内开启事务线程要注意的问题. Spring 事务原理这里不多说,网上一搜一大堆,也就是基于AOP配合ThreadLocal实现. 这里 ...

  4. 初版python计算器

    作业: 使用正则表达式实现计算器功能. 实现: 1.实现带括号的计算 2.实现指数.加减乘除求余等功能 先看运行结果: 请输入您的计算式: 1 - 2 * ( (60-30 +(-40.0/5) * ...

  5. 关于VS2013调试IIS应用源代码时无法进入断点的问题总结

    调试无法进入断点 前言:今天再次遇到之前调试无法进入断点的问题,本来想不写呢觉得没什么只是又犯了同样的错误,但是我发现这个问题我分析起来还是挺费劲的,我仔细想了想原因, 是因为自己对之前的错误没有进行 ...

  6. firebug中的console常用的方法

    firebug中的console常用的方法 1.console.log("Hello!"); --------------------显示基本信息 2.console.info(& ...

  7. GJB150-2009军用装备实验室环境试验方法新版标准

    http://www.kekaoxing.com/m/view.php?aid=22604 GJB150.1A-2009 军用装备实验室环境试验方法第1部分:通用要求(代替GJB150.1-86)GJ ...

  8. Deadlock found when trying to get lock; try restarting transaction

    1.错误描述 [ERROR:]2015-06-09 16:56:19,481 [抄送失败] org.hibernate.exception.LockAcquisitionException: erro ...

  9. 浅谈IT企业挑选技术人员招聘几个要点

    在实际人员招聘的一些感想总结,企业需要怎么样的人才,个人总结如下: 1.技术能力不是第一位 企业在招聘一个人的时候往往看你第一点不是技术实力,而是你个人言谈行为和态度,往往一个面试你的人员他不可能在半 ...

  10. Day25 前端自学日记——入坑记

    一 学习契机 今年是走出校门的第一个年头,进入了一家还算不错的公司,领着一份还算不错的薪水,在外人眼中,似乎这样已经不错了,只要我努力好好做,前程一片光明.可事实真是这样吗?两份实习经历都指向我应该从 ...