配置phabricator& amp; nginx的

时间:2014-04-30 16:47:27

标签: php nginx phabricator

我使用phabricator网站上的install_ubunbu脚本在ubuntu上安装了phabricator,该脚本已成功运行。我已经在服务器上安装了MySQL - 我在default.conf.php文件中添加了数据库凭据。我也从他们的网站复制了Nginx配置。我在端口82上添加了一个监听端口。但是,当我尝试访问浏览器中的url / port时,我收到以下Nginx错误消息(来自nginx日志):

错误消息

2014/04/30 12:41:35 [error] 14691#0: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 192.xxx.xxx.xxx, server: phabricator.xxxx.com, request: "GET / HTTP/1.1", upstream:
 "fastcgi://127.0.0.1:9000", host: "192.xxx.xxx.xxx:82"

Nginx conf

server {
       listen 82;  ### 520;
       listen [::]:82;
       server_name phabricator.xxxx.com;

       root /usr/local/phabricator/phabricator/webroot;
       try_files $uri $uri/ /index.php;

       access_log /var/log/nginx/phabricator/access.log;
       error_log /var/log/nginx/phabricator/error.log;

      location / {
                index index.php;

                if ( !-f $request_filename) {
                    rewrite ^/(.*)$ /index.php?__path__=/$1 last;
                    break;
                }
        }

       location ~ .php$ {
           fastcgi_pass localhost:9000;
           fastcgi_index index.php;

           #custom environment variable
           fastcgi_param PHABRICATOR_ENV   "custom/myconfig";  ##change this

           #required if PHP was built with --enable-force-cgi-redirect
           fastcgi_param REDIRECT_STATUS 200;

           #variables to make the $_SERVER populate in PHP
           fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
           fastcgi_param  QUERY_STRING     $query_string;
           fastcgi_param  REQUEST_METHOD   $request_method;
           fastcgi_param  CONTENT_TYPE     $content_type;
           fastcgi_param  CONTENT_LENGTH   $content_length;

           fastcgi_param  SCRIPT_NAME      $fastcgi_script_name;

           fastcgi_param  GATEWAY_INTERFACE CGI/1.1;
           fastcgi_param  SERVER_SOFTWARE  nginx/$nginx_version;

           fastcgi_param  REMOTE_ADDR      $remote_Addr;
   }
}

有关对此进行故障排除的任何想法,或者如果我需要遵循设置phabricator的其他步骤,我们将不胜感激。

1 个答案:

答案 0 :(得分:3)

这是飞行员错误 - 自从我使用php5-fpm.sock(在/etc/php5/fpm/pool.d /中配置)以来,php5-fpm没有在9000上监听