【发布时间】:2018-02-25 03:25:47
【问题描述】:
我遇到了最奇怪的问题。过去几天我一直在处理文件上传问题,并且一直在使用phpinfo() 来跟踪 INI 设置的更改。我最后一次触摸它是在两天前...当时一切正常。
今天,phpinfo() 导致 503 服务暂时不可用错误。这是奇怪的部分:该网站运行良好!我是 PHP + MySQL 驱动的,我可以在其中很好地移动(嗯......除了我正在处理的问题)。但是一旦我添加phpinfo() 以显示为<body> 块中的第一件事......我得到了错误。
我什至尝试过创建一个单行文件:<?php phpinfo(); ?> 这也因 503 错误而死。
错误日志包含以下内容:
[Fri Sep 15 14:22:31.192593 2017] [proxy_fcgi:error] [pid 2695] (104)Connection reset by peer: [client 67.161.220.240:44230] AH01075: Error dispatching request to :
我已经重新启动了 Apache 和 Nginx,没有出现任何错误。有没有人知道我的机器上可能会死掉什么服务或类似的服务来导致这种情况?
NGINX 配置文件
#user nginx;
worker_processes 1;
#error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
#pid /var/run/nginx.pid;
include /etc/nginx/modules.conf.d/*.conf;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#tcp_nodelay on;
#gzip on;
#gzip_disable "MSIE [1-6]\.(?!.*SV1)";
server_tokens off;
include /etc/nginx/conf.d/*.conf;
}
# override global parameters e.g. worker_rlimit_nofile
include /etc/nginx/*global_params;
【问题讨论】:
-
您是否在托管自己的网站,如果是,您是否管理 PHP 安装?
phpinfo通常被视为安全漏洞并被系统管理员关闭 -
旁注,您不必回显 phpinfo()。它与自己相呼应。 (但这不应该导致这个问题,仅供参考。)
-
显示 nginx 配置。 php部分。
-
@sensorario,已添加。
-
@jhenderson2099,我拥有自己的网站。如前所述,这一切都在两天前奏效。
标签: php apache nginx http-status-code-503