我已经将apache配置为对tomcat的froward请求。以下是我的配置。
<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配置,或者是编码问题......我认为这是一个配置问题......请帮帮我..
答案 0 :(得分:1)
我修复它后遇到两个问题tomcat没有崩溃..