页面暂时不可用-NGINX

页面暂时不可用-NGINX,nginx,Nginx,我有一个问题,我怀疑是NGINX问题。基本上,当我尝试登录到我创建的站点时,我会出现以下错误 您正在查找的页面暂时不可用。请稍后再试。 以前有人遇到过这个问题吗?你的网站使用FastCGI吗?可能会返回此消息,因为。如果NGINX vhost文件中的fastcgi\u pass指令不正确,则可能会出现此问题 如果您使用fastcgi,它应该类似于以下内容:fastcgi\u pass 127.0.0.1:9000 如果您使用fpm,它应该是这样的:fastcgi\u pass unix:/var

我有一个问题,我怀疑是NGINX问题。基本上,当我尝试登录到我创建的站点时,我会出现以下错误

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


以前有人遇到过这个问题吗?

你的网站使用FastCGI吗?可能会返回此消息,因为。

如果NGINX vhost文件中的
fastcgi\u pass
指令不正确,则可能会出现此问题

如果您使用fastcgi,它应该类似于以下内容:
fastcgi\u pass 127.0.0.1:9000

如果您使用fpm,它应该是这样的:
fastcgi\u pass unix:/var/run/php5-fpm.sock


顺便说一句,这是一个一年前的问题,但谷歌针对这个问题向我提出了这个问题。所以我决定写下我的发现。

对我来说,这有助于消除symfony上的错误和这个流浪的图像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;
 }
}
您需要调整根目录、服务器名称以匹配您的案例