【问题标题】:Page temporarily unavailable - NGINX页面暂时不可用 - NGINX
【发布时间】:2016-04-20 22:17:03
【问题描述】:

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

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

以前有人遇到过这种情况吗?

【问题讨论】:

    标签: nginx


    【解决方案1】:

    如果您在 NGINX vhost 文件中的 fastcgi_pass 指令不正确,可能会出现此问题。

    如果你使用fastcgi,应该是这样的:fastcgi_pass 127.0.0.1:9000;

    如果你使用fpm,应该是这样的:fastcgi_pass unix:/var/run/php5-fpm.sock;

    附:这是一个一年前的问题,但谷歌针对这个问题将我引导到这个问题。所以我决定写下我发现的东西。

    【讨论】:

      【解决方案2】:

      您的网站是否使用 FastCGI?由于the FastCGI server is not running,可能会返回此消息。

      【讨论】:

        【解决方案3】:

        对我来说,它有助于摆脱 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 以匹配您的情况。

        【讨论】:

          猜你喜欢
          • 2017-11-18
          • 1970-01-01
          • 2019-12-29
          • 2021-10-03
          • 2012-04-29
          • 2021-07-25
          • 1970-01-01
          • 2012-07-01
          • 2017-05-06
          相关资源
          最近更新 更多