3

我有一个我怀疑是 NGINX 问题的问题。基本上,当我尝试登录我创建的网站时,我得到了以下错误......

你正在寻找的页面暂时不可用。请稍后再试。

有没有人遇到过这个?

4

3 回答 3

3

This problem may occur if you have incorrect fastcgi_pass directive in NGINX vhost file.

If you use fastcgi, it should be similar to this: fastcgi_pass 127.0.0.1:9000;

If you use fpm, it should be like this: fastcgi_pass unix:/var/run/php5-fpm.sock;

P.S. It is a one year old question, but Google directs me to this question for this problem. So I decided to write what I found.

于 2013-08-02T20:28:25.533 回答
2

Does your site using FastCGI? This message could be returned because the FastCGI server is not running.

于 2012-06-03T00:06:27.847 回答
0

对我来说,它有助于消除 symfony 上的错误和这个 vagrant image https://github.com/rlerdorf/php7dev这个 nginx 配置:

server {
 listen [::]:80;
 listen 80;

 server_name test;

 root /var/www/default/web;

 charset utf-8;

 index index.php index.html;
 fastcgi_index index.php;
 client_max_body_size 128M;
 location ~ /\. { deny all; access_log off; log_not_found off; }

 location ~ ^/(app_dev|config)\.php(/|$) {
   fastcgi_pass unix:/var/run/php-fpm.sock;
   fastcgi_split_path_info ^(.+\.php)(/.*)$;
   include fastcgi_params;

   fastcgi_param  SCRIPT_FILENAME  $realpath_root$fastcgi_script_name;
   fastcgi_param DOCUMENT_ROOT $realpath_root;
 }

 location / {
   try_files $uri /app_dev.php$is_args$args;
 }
}

您需要调整 root、server_name 以匹配您的情况。

于 2016-04-20T14:17:03.710 回答