2012-06-01 22 views
3

我有一个问题,我怀疑是NGINX问题。基本上,当我尝试登录到我创建的网站时,出现以下错误......页面暂时不可用 - NGINX

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

有没有人曾经遇到过这个?

回答

3

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

如果使用FastCGI的,它应该是与此类似:fastcgi_pass 127.0.0.1:9000;

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

附:这是一个一年前的问题,但谷歌指示我解决这个问题。所以我决定写我发现的东西。

0

对我来说,它有助于获取有关的symfony摆脱错误的和这个流浪汉形象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; 
} 
} 

您需要调整根,服务器名,以配合您的案件。