该文档包含了Phabricator所需的最基本的配置指引。 php
该文档假定你已经安装了全部必需的组件。若是没有,请查看安装向导。 html
下一步: nginx
运行Apache,并使用一个测试页来验证其是否正常工做。若是有问题,请查看Apache的帮助文档。确保mod_php和mod_rewrite启用,若是你设置SSL,请开启mod_ssl模块。 web
若是你尚未设置一个域名指向你将要安装的主机上。你能够安装Phabricator到一个二级域名(如phabricator.example.com)上或一个完整域名上,但你不能安装到一个已经存在的网站的某个子目录下。输入你将要安装到的域名以确保Apache能够为其正常服务,而且DNS已经正确配置。 shell
如今,能够建立一个VirtualHost条目(放置Phabricator到一个二级域名上)或编辑Directory条目的DocumentRoot。将以下所示: 数据库
httpd.conf apache
<VirtualHost *> # Change this to the domain which points to your host. ServerName phabricator.example.com # 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 /path/to/phabricator/webroot RewriteEngine on RewriteRule ^/rsrc/(.*) - [L,QSA] RewriteRule ^/favicon.ico - [L,QSA] RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA] </VirtualHost>
若是当前的Apache配置不能为你所放置的Phabricator文档目录服务,你须要添加以下的部分到httpd.conf中 ubuntu
<Directory "/path/to/phabricator/webroot"> Order allow,deny Allow from all </Directory>
更改后,重启Apache,而后跳转到下面的设置步骤。 浏览器
For nginx, use a configuration like this: 服务器
nginx.conf
server { server_name phabricator.example.com; root /path/to/phabricator/webroot; try_files $uri $uri/ /index.php; location / { index index.php; if ( !-f $request_filename ) { rewrite ^/(.*)$ /index.php?__path__=/$1 last; break; } } location /index.php { fastcgi_pass localhost:9000; fastcgi_index index.php; #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; } }
Restart nginx after making your edits, then continue to "Setup" below.
For lighttpd, add a section like this to your lighttpd.conf:
$HTTP["host"] =~ "phabricator(\.example\.com)?" { server.document-root = "/path/to/phabricator/webroot" url.rewrite-once = ( "^(/rsrc/.*)$" => "$1", "^(/favicon.ico)$" => "$1", # This simulates QSA ("query string append") mode in apache "^(/[^?]*)\?(.*)" => "/index.php?__path__=$1&$2", "^(/.*)$" => "/index.php?__path__=$1", ) }
You should also ensure the following modules are listed in your server.modules list:
mod_fastcgi mod_rewrite
Finally, you should run the following commands to enable php support:
$ sudo apt-get install php5-cgi # for ubuntu; other distros should be similar $ sudo lighty-enable-mod fastcgi-php
Restart lighttpd after making your edits, then continue below.
如今,输入你设置的域名。你将会看到设置指引。文档的余下部分为其余具体设置步骤的附加说明。
设置中,你须要配置MySQL。运行MySQL,验证是否能正常链接。若是有问题,请参考MySQL的帮助文档。若是MySQL正常工做,你须要加载Phabricator的模式,运行命令:
phabricator/ $ ./bin/storage upgrade
若是你配置了一个无特权的用户以链接数据库,你将不得不从新设置为root用户或其余的管理员以使模式能被应用。
phabricator/ $ ./bin/storage upgrade --user <user> --password <password>
You can avoid the prompt the script issues by passing the --force flag (for example, if you are scripting the upgrade process).
phabricator/ $ ./bin/storage upgrade --force
继续: