[英]Zend app on nginx returns blank page with CONNECTION_ERROR
我正在尝试设置一个作为生产副本的开发服务器。 那里安装了 PHP/Zend 应用程序,并由 nginx Web 服务器提供服务。 我已经配置了 nginx 和应用程序。 但是当连接到应用程序时,我看到只有“CONNECTION_ERROR”这个文本的空白页面。
你可以在这里看到它。 http://... 没有了 :)
问题是 nginx error.log 什么也没说。 access.log 显示:
[17/Nov/2020:20:15:56 +0000] "GET /archipelago/index/login/ HTTP/1.1" 200 47 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0"
应用程序日志根本没有信息。 所以看起来应用程序没有返回 CONNECTION_ERROR 。 所以这是哪里来的???!!!
任何人都可以给出任何提示如何调试它? 也许nginx conf会有所帮助?
应用程序.conf:
location /archipelago {
alias /opt/bitnami/archipelago/www/public;
if (-f $request_filename) {
break;
}
rewrite (.*) /archipelago/index.php?$args;
location ~ /archipelago/(.+\.php)$ {
alias /opt/bitnami/archipelago/www/public/$1;
include "/opt/bitnami/nginx/conf/bitnami/php-fpm.conf";
include "/opt/bitnami/nginx/conf/bitnami/protect-hidden-files.conf";
}
}
php-fpm.conf:
index index.html index.htm $yii_bootstrap;
set $yii_bootstrap "index.php";
location ~ \.php {
fastcgi_split_path_info ^(.+\.php)(.*)$;
#let yii catch the calls to unexising PHP files
set $fsn /$yii_bootstrap;
if (-f $document_root$fastcgi_script_name){
set $fsn $fastcgi_script_name;
}
fastcgi_read_timeout 300;
fastcgi_pass unix:/opt/bitnami/php/var/run/www.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fsn;
#PATH_INFO and PATH_TRANSLATED can be omitted, but RFC 3875 specifies them for CGI
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fsn;
}
不管看起来多么奇怪,CONNECTION_ERROR 是数据库访问的问题。 :)
还是很难想象为什么这个没有记录在应用日志中! 应用程序返回的所有内容都是带有此 CONNECTION_ERROR 的 html。
您可能认为 DB 访问应该首先检查您是否看到此错误,但我确信 DB 用户是正确的。 仍然不确定为什么 DB 不接受它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.