2016-10-28 56 views
0

我試圖在CentOS安裝Phabricator安裝phabricator,我按照安裝的所有步驟,但我正在逐漸Request parameter '__path__' is not set. Your rewrite rules are not configured correctly.得到錯誤,而在CentOS 6

貝婁是虛擬主機條目。

<VirtualHost *:80> 
ServerAdmin [email protected] 
ServerName phabricator.test.com 
DocumentRoot /var/www/html/myapps/phabricator/webroot/ 
RewriteEngine on 
RewriteRule ^/rsrc/(.*)     -                       [L,QSA] 
RewriteRule ^/favicon.ico   -                       [L,QSA] 
RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA] 
ErrorLog logs/phabricator.test.com-error_log 
CustomLog logs/phabricator.test.com-access_log common 
<Directory "/var/www/html/myapps/phabricator/webroot/"> 
    Order allow,deny 
    Allow from all 
</Directory> 

任何幫助,將不勝感激。

+0

此配置看起來很舊。有關最新的配置示例,請參閱https://secure.phabricator.com/book/phabricator/article/configuration_guide/。 –

+0

@Chad小礦的apache版本是2.2.5,對於這個版本以上的配置在安裝手冊中給出,但仍然不起作用。 – Nitin

回答

0

我使用apache 2.4.6在centos7系統上運行phabricator。

你可以使用這樣的事情:

NameVirtualHost *:443 
<VirtualHost 192.168.0.1:443> 
     SSLEngine on 
     SSLCertificateFile /etc/pki/tls/certs/mycert.crt 
     SSLCertificateKeyFile /etc/pki/tls/private/mykey.pem 

     ServerName phabricator.myside.local 
     ServerAlias hostname.myside.local 

     # Change this to the path where you put 'phabricator' when you checked it 
     # out from GitHub when following the Installation Guide. 
     # 
     # Make sure you include "/webroot" at the end! 
     DocumentRoot /opt/phabricator/webroot 

     <IfModule mod_rewrite.c> 
       RewriteEngine on 
       RewriteRule ^/rsrc/(.*)  -      [L,QSA] 
       RewriteRule ^/favicon.ico -      [L,QSA] 
       RewriteRule ^(.*)$   /index.php?__path__=$1 [B,L,QSA] 
     </IfModule> 

     <Directory "/opt/phabricator/webroot"> 
       Require all granted 
     </Directory> 

     ## mod_php5 directives 
     <IfModule mod_php5.c> 
       php_admin_flag engine     On 
       php_value  upload_max_filesize  256M 
       php_value  post_max_size   256M 
       php_value  output_buffering  16384 
       php_admin_value date.timezone   'Europe/Berlin' 
       php_value  include_path   '.:/opt/PHPExcel/Classes/' 
       php_value  memory_limit   256M 
       php_value  always_populate_raw_post_data -1 

     </IfModule> 

     <LocationMatch "\.(?i:os)$"> 
       ForceType application/octet-stream 
       Header set Content-Disposition attachment 
     </LocationMatch> 
</VirtualHost> 

減少post_max_sizeupload_max_filesize根據您的需要。我們有嵌套在Git代碼庫一些大的二進制文件,所以我們不得不增加它:)

1
RewriteRule ^(.*)$   /index.php?__path__=$1 [B,L,QSA] 

我只是不停地在上面的虛擬主機線。已刪除以下行並重新啓動apache。它現在爲我工作。

RewriteRule ^/rsrc/(.*)  -      [L,QSA] 
RewriteRule ^/favicon.ico -      [L,QSA]