2014-04-30 90 views
2

我在ubuntu上安裝了phabricator,使用來自phabricator站點的install_ubunbu腳本,它已成功運行。我已經在服務器上安裝了MySQL - 我在default.conf.php文件中添加了DB憑據。我也從他們的網站複製了Nginx配置。我加在端口82但是一個監聽端口,當我嘗試訪問的URL /端口在瀏覽器中,我得到以下Nginx的錯誤信息(來自nginx的日誌):問題與配置phabricator&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,將不勝感激任何想法。

+0

導頻錯誤 - PHP5 -fpm沒有在9000上進行監聽 - 我使用的是php5-fpm.sock。 –

回答

3

這是導頻錯誤 - PHP5-FPM沒有上9000聽,因爲我使用的php5-fpm.sock代替(在/etc/php5/fpm/pool.d/配置)

+0

那麼我該如何解決它? – user2002692

+1

你是否在phabricator前運行nginx - 如果是這樣,你使用的是php5-fpm,如果是的話,你使用的是php5-fpm.sock嗎? –

+0

我想通了,在我的情況下,php-fpm沒有運行,所以我不得不做sudo服務php-fpm start,這解決了我的問題。 – user2002692