- 论坛徽章:
- 0
|
1. 结构:apache--play-1.2.4--mysql
2. apache开启80监听,当收到请求后转发到play的9000监听端口上。在不开启iptables的情况下网站可以正常访问,当开启iptables的时候网站就访问不了啦。从多方面进行过测试也没发现那里的问题,selinux关闭了,防火墙配置、apache错误日志,从日志看是代理上出现问题,但是不开防火墙没事,一开就访问不了。
3. apache代理配置
<VirtualHost *:80>
ProxyPreserveHost On
ServerName 3B.shengjing360.com
ProxyPass / http://127.0.0.1:9000/
ProxyPassReverse / http://127.0.0.1:9000/
</VirtualHost>
4. iptables配置
Chain INPUT (policy DROP)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:9000
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
5. apache错误日志:
[Wed May 29 14:17:29 2013] [error] [client 192.168.13.8] proxy: Error reading from remote server returned by /application/login
[Wed May 29 14:17:46 2013] [error] [client 192.168.13.8] (70007)The timeout specified has expired: proxy: error reading status line from remote server 127.
0.0.1
[Wed May 29 14:17:46 2013] [error] [client 192.168.13.8] proxy: Error reading from remote server returned by /
[Wed May 29 14:46:27 2013] [notice] caught SIGTERM, shutting down
[Wed May 29 14:46:28 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Wed May 29 14:46:28 2013] [notice] Digest: generating secret for digest authentication ...
[Wed May 29 14:46:28 2013] [notice] Digest: done
[Wed May 29 14:46:28 2013] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations
[Wed May 29 14:46:57 2013] [error] (110)Connection timed out: proxy: HTTP: attempt to connect to 127.0.0.1:9000 (127.0.0.1) failed
[Wed May 29 14:46:57 2013] [error] ap_proxy_connect_backend disabling worker for (127.0.0.1)
|
|