简体   繁体   English

nginx 上的 Zend 应用程序返回带有 CONNECTION_ERROR 的空白页面

[英]Zend app on nginx returns blank page with CONNECTION_ERROR

I am trying to set up a dev server that is a copy of production.我正在尝试设置一个作为生产副本的开发服务器。 There is PHP/Zend application installed there and served by nginx web server.那里安装了 PHP/Zend 应用程序,并由 nginx Web 服务器提供服务。 I have configured nginx and the app.我已经配置了 nginx 和应用程序。 But when connecting to the app I am getting empty page with this text only "CONNECTION_ERROR".但是当连接到应用程序时,我看到只有“CONNECTION_ERROR”这个文本的空白页面。

You can see it here.你可以在这里看到它。 http://... not any more :) http://... 没有了 :)

The problem is that nginx error.log says nothing.问题是 nginx error.log 什么也没说。 And access.log shows this: 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"

Application log has no information at all.应用程序日志根本没有信息。 So it seems like the CONNECTION_ERROR is not returned by the application.所以看起来应用程序没有返回 CONNECTION_ERROR 。 So where is this from???!!!所以这是哪里来的???!!!

Can anybody give any hint how to debug this?任何人都可以给出任何提示如何调试它? Maybe nginx conf will help?也许nginx conf会有所帮助?

app.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: 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;
}

However strange it seems, the CONNECTION_ERROR was an issue with DB access.不管看起来多么奇怪,CONNECTION_ERROR 是数据库访问的问题。 :) :)

It is still hard to imagine why this was not recorded in the application log!还是很难想象为什么这个没有记录在应用日志中! All that the application returned was html with this CONNECTION_ERROR.应用程序返回的所有内容都是带有此 CONNECTION_ERROR 的 html。

You may think the DB access should be the first to check if you see this error but I was sure the DB user was correctly.您可能认为 DB 访问应该首先检查您是否看到此错误,但我确信 DB 用户是正确的。 Still not sure why DB is not accepting it.仍然不确定为什么 DB 不接受它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM