0

我已将 apache 配置为对 tomcat 的请求。以下是我的配置。

<VirtualHost *:80>

ServerName ***
ServerAlias ***
ServerAlias ***


RewriteEngine on
RewriteCond %{HTTP_HOST} =***
RewriteRule (.*) https://***/ [R]
RewriteCond %{HTTP_HOST} =***
RewriteRule (.*) https://***/ [R]
RewriteCond %{HTTP_HOST} =***
RewriteRule (.*) https://***/ [R]


</VirtualHost>

<VirtualHost *:443>

ServerName ***
ServerAlias ***
ServerAlias ***

ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/


SSLEngine on
SSLCertificateFile /etc/pki/tls/certs/***.com.crt
SSLCertificateKeyFile /etc/pki/tls/private/***.key
SSLCACertificateFile /etc/pki/tls/certs/***.crt

</VirtualHost>

我在 apache 日志中收到以下错误

[Sun Feb 26 23:28:28 2012] [error] (111)Connection refused: proxy: AJP: attempt to connect to 127.0.0.1:8009 (localhost) failed   
[Sun Feb 26 23:28:28 2012] [error] ap_proxy_connect_backend disabling worker for (localhost)   
[Sun Feb 26 23:28:28 2012] [error] proxy: AJP: failed to make connection to backend: localhost   
[Sun Feb 26 23:28:29 2012] [error] proxy: AJP: disabled connection for (localhost) 
[Sun Feb 26 23:28:29 2012] [error] proxy: AJP: disabled connection for (localhost)

它可以正常工作一段时间然后突然我收到以下错误

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

当我尝试netstat -antup | grep 8009命令时,我得到以下

tcp        1      0 ::1:40293                   ::1:8009                    CLOSE_WAIT  32434/httpd         
tcp        1      0 ::1:40288                   ::1:8009                    CLOSE_WAIT  32430/httpd         
tcp        1      0 ::1:40289                   ::1:8009                    CLOSE_WAIT  32429/httpd         
tcp        1      0 ::1:40294                   ::1:8009                    CLOSE_WAIT  32622/httpd         
tcp        1      0 ::1:40292                   ::1:8009                    CLOSE_WAIT  32435/httpd         
tcp        1      0 ::1:40290                   ::1:8009                    CLOSE_WAIT  32436/httpd         
tcp        1      0 ::1:40287                   ::1:8009                    CLOSE_WAIT  32433/httpd  

我无法弄清楚我的问题在哪里。是apache配置还是tomcat配置还是编码问题...我相信这是一个配置问题...请帮帮我..

4

1 回答 1

1

修复后我有两个问题tomcat没有崩溃..

  1. 在硬盘中有坏扇区..我在消息日志中发现所以 java 崩溃了..
  2. 我运行了旧的石英调度程序..我删除了那个,然后现在tomcat没有崩溃..
于 2012-03-12T11:52:14.987 回答