问题排查:The requested URL /test/index.jsp was not found on this server

问题描述

添加一个新模块,部署在服务器上。服务器上还部署有其他模块且访问正常,新模块和其他模块共用同一个域名。服务部署之后,请求如下:
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" />
 <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 启动成功

转载于:https://www.cnblogs.com/shoren/p/java-tomcat-apache.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值