我有一个在Unix服务器上运行的apache http服务器,它服务于PHP应用程序直到昨天。今天我得到"无法连接到服务器"从浏览器访问应用程序。如果我尝试启动服务器 -
-bash-4.1$ ./apachectl start
httpd (pid 19978) already running
我尝试通过向localhost发送curl请求来检查apache服务器 -
-bash-4.1$ curl http://localhost:80
curl: (7) couldn't connect to host
-bash-4.1$ nc -vz localhost 80
nc: connect to localhost port 80 (tcp) failed: Connection refused
nc: connect to localhost port 80 (tcp) failed: Connection refused
logs / error_log:
[Wed May 10 04:43:20 2017] [notice] Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.1m PHP/5.6.7 configured -- resuming normal operations
[Wed May 10 04:46:00 2017] [notice] caught SIGTERM, shutting down
[Wed May 10 04:46:06 2017] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed May 10 04:46:06 2017] [notice] Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.1m PHP/5.6.7 configured -- resuming normal operations
[Wed May 10 04:55:13 2017] [notice] caught SIGTERM, shutting down
[Wed May 10 04:55:39 2017] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed May 10 04:55:39 2017] [notice] Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.1m PHP/5.6.7 configured -- resuming normal operations
[Wed May 10 05:49:51 2017] [notice] caught SIGTERM, shutting down
[Wed May 10 05:50:11 2017] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed May 10 05:50:11 2017] [notice] Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.1m PHP/5.6.7 configured -- resuming normal operations
[Wed May 10 06:28:21 2017] [notice] caught SIGWINCH, shutting down gracefully
[Wed May 10 06:28:39 2017] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Wed May 10 06:28:39 2017] [notice] Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.1m PHP/5.6.7 configured -- resuming normal operations
[Wed May 10 06:28:47 2017] [notice] Graceful restart requested, doing restart
[Wed May 10 06:28:47 2017] [notice] Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/1.0.1m PHP/5.6.7 configured -- resuming normal operations
日志/访问日志
17.169.113.84 - - [10/May/2017:03:36:36 +0000] "GET /sdk/vimService.wsdl HTTP/1.1" 404 217
17.169.113.84 - - [10/May/2017:03:36:37 +0000] "GET /xmldata?item=all HTTP/1.1" 404 205
17.169.113.84 - - [10/May/2017:03:36:43 +0000] "HEAD / HTTP/1.1" 200 -
17.169.113.84 - - [10/May/2017:04:41:57 +0000] "GET / HTTP/1.1" 304 -
17.169.113.84 - - [10/May/2017:04:41:57 +0000] "GET /login.php HTTP/1.1" 200 33
17.169.113.84 - - [10/May/2017:04:41:58 +0000] "GET / HTTP/1.1" 200 55
17.169.113.84 - - [10/May/2017:04:41:58 +0000] "GET /favicon.ico HTTP/1.1" 404 209
17.169.113.84 - - [10/May/2017:04:41:58 +0000] "GET /login.php HTTP/1.1" 200 33
17.169.113.84 - - [10/May/2017:04:44:03 +0000] "GET /login.php HTTP/1.1" 200 33
17.169.113.84 - - [10/May/2017:04:44:43 +0000] "GET /login.php HTTP/1.1" 200 33
17.169.113.84 - - [10/May/2017:04:44:47 +0000] "GET /login.php HTTP/1.1" 200 33
17.169.113.84 - - [10/May/2017:04:45:27 +0000] "GET /login.php HTTP/1.1" 200 33
17.169.113.84 - - [10/May/2017:04:46:46 +0000] "GET /login.php HTTP/1.1" 200 33
17.169.113.84 - - [10/May/2017:04:57:30 +0000] "GET / HTTP/1.1" 200 55
17.169.113.84 - - [10/May/2017:04:57:30 +0000] "GET /login.php HTTP/1.1" 302 -
17.169.113.84 - - [10/May/2017:05:06:34 +0000] "GET / HTTP/1.1" 200 55
17.169.113.84 - - [10/May/2017:05:06:34 +0000] "GET /login.php HTTP/1.1" 302 -
17.169.113.84 - - [10/May/2017:06:13:40 +0000] "GET / HTTP/1.1" 200 55
17.169.113.84 - - [10/May/2017:06:13:40 +0000] "GET /login.php HTTP/1.1" 302 -
17.40.176.54 - - [10/May/2017:06:28:21 +0000] "OPTIONS * HTTP/1.0" 200 -
17.40.176.54 - - [10/May/2017:06:28:21 +0000] "OPTIONS * HTTP/1.0" 200 -
17.40.176.54 - - [10/May/2017:06:28:47 +0000] "OPTIONS * HTTP/1.0" 200 -
17.40.176.54 - - [10/May/2017:06:28:47 +0000] "OPTIONS * HTTP/1.0" 200 -
17.40.176.54 - - [10/May/2017:06:28:47 +0000] "OPTIONS * HTTP/1.0" 200 -
17.40.176.54 - - [10/May/2017:06:28:47 +0000] "OPTIONS * HTTP/1.0" 200 -
17.40.176.54 - - [10/May/2017:06:28:47 +0000] "OPTIONS * HTTP/1.0" 200 -
17.169.113.84 - - [10/May/2017:06:38:26 +0000] "GET / HTTP/1.1" 200 55
17.169.113.84 - - [10/May/2017:06:38:26 +0000] "GET /login.php HTTP/1.1" 302 -
17.169.113.84 - - [10/May/2017:06:44:46 +0000] "GET / HTTP/1.1" 200 55
17.169.113.84 - - [10/May/2017:06:44:46 +0000] "GET /login.php HTTP/1.1" 302 -
17.169.113.84 - - [10/May/2017:06:48:05 +0000] "GET / HTTP/1.1" 200 55
17.169.113.84 - - [10/May/2017:06:48:06 +0000] "GET /login.php HTTP/1.1" 302 -
任何人都可以帮我识别这台服务器的错误吗?
答案 0 :(得分:0)
“拒绝连接”意味着有些人主动阻止连接。如果您在连接到localhost时遇到此错误,则问题是计算机的本地问题。看看你的iptables配置。