2011-02-11 23:58:45 +01:00
|
|
|
@title Configuration Guide
|
|
|
|
@group config
|
|
|
|
|
|
|
|
This document contains basic configuration instructions for Phabricator.
|
|
|
|
|
|
|
|
= Prerequisites =
|
|
|
|
|
|
|
|
This document assumes you've already installed all the components you need.
|
|
|
|
If you haven't, see @{article:Installation Guide}.
|
|
|
|
|
|
|
|
= Configuring MySQL =
|
|
|
|
|
|
|
|
Get MySQL running and verify you can connect to it. Consult the MySQL
|
2011-03-06 23:56:12 +01:00
|
|
|
documentation for help. When MySQL works, you need to load the Phabricator
|
|
|
|
schemata into it. First, load the initial database schema.
|
2011-02-11 23:58:45 +01:00
|
|
|
|
|
|
|
mysql -uroot < path/to/phabricator/resources/sql/init/initialize.sql
|
|
|
|
|
2011-04-12 01:47:51 +02:00
|
|
|
After this you need to upgrade the schema see @{article:Upgrading Schema},
|
|
|
|
but you need to finish the rest of the configuration first.
|
2011-03-06 23:56:12 +01:00
|
|
|
|
2011-02-11 23:58:45 +01:00
|
|
|
= Configuring Apache =
|
|
|
|
|
|
|
|
Get Apache running and verify it's serving a test page. Consult the Apache
|
|
|
|
documentation for help. Make sure ##mod_php## and ##mod_rewrite## are enabled,
|
|
|
|
and ##mod_ssl## if you intend to set up SSL.
|
|
|
|
|
|
|
|
If you haven't already, set up a domain name to point to the host you're
|
|
|
|
installing on. You can either install Phabricator on a subdomain (like
|
|
|
|
phabricator.example.com) or an entire domain, but you can not install it in
|
|
|
|
some subdirectory of an existing website. Navigate to whatever domain you're
|
|
|
|
going to use and make sure Apache serves you something to verify that DNS
|
|
|
|
is correctly configured.
|
|
|
|
|
|
|
|
Now, either create a VirtualHost entry (to put Phabricator on a subdomain)
|
|
|
|
or edit the Directory entry for the DocumentRoot. It should look something like
|
|
|
|
this:
|
|
|
|
|
|
|
|
<VirtualHost *>
|
|
|
|
# Change this to the domain which points to your host.
|
|
|
|
ServerName phabricator.example.com
|
2011-03-06 23:56:12 +01:00
|
|
|
|
2011-02-11 23:58:45 +01:00
|
|
|
# Change this to the path where you put 'phabricator' when you checked it
|
|
|
|
# out from github when following the Installation Guide.
|
|
|
|
DocumentRoot /path/to/phabricator/webroot
|
2011-03-06 23:56:12 +01:00
|
|
|
|
2011-02-11 23:58:45 +01:00
|
|
|
RewriteEngine on
|
|
|
|
RewriteRule ^/rsrc/(.*) - [L,QSA]
|
|
|
|
RewriteRule ^/favicon.ico - [L,QSA]
|
|
|
|
RewriteRule ^(.*)$ /index.php?__path__=$1 [L,QSA]
|
|
|
|
|
|
|
|
# This will use "setup" defaults for configuration options, which will
|
|
|
|
# expose error messages. Before you make the install public, you should
|
|
|
|
# change this to "production" and/or customize your configuration. See
|
|
|
|
# the next section for details.
|
|
|
|
SetEnv PHABRICATOR_ENV setup
|
|
|
|
</VirtualHost>
|
2011-03-06 23:56:12 +01:00
|
|
|
|
2011-02-11 23:58:45 +01:00
|
|
|
Now, restart apache and navigate to whichever subdomain you set up. You should
|
|
|
|
either see the Phabricator login screen, which means you're all set, or some
|
|
|
|
useful error message telling you what else you need to fix (for instance, you
|
|
|
|
may need to set up MySQL credentials). If you see something else, you did
|
|
|
|
something very wrong and/or this document lied to you.
|
|
|
|
|
|
|
|
= Configuring Phabricator =
|
|
|
|
|
|
|
|
Now that basic setup is complete, you should configure Phabricator. Phabricator
|
|
|
|
configuration options which control how the applications behave are stored here:
|
|
|
|
|
|
|
|
/path/to/phabricator/conf/
|
2011-03-06 23:56:12 +01:00
|
|
|
|
2011-02-11 23:58:45 +01:00
|
|
|
There are several configuration templates:
|
|
|
|
|
2011-02-12 01:12:02 +01:00
|
|
|
- ##default.conf.php##: root configuration, lists every configuration option
|
|
|
|
and sets some default for it. Look in this file to figure out what you can
|
2011-02-11 23:58:45 +01:00
|
|
|
configure.
|
2011-02-12 01:12:02 +01:00
|
|
|
- ##development.conf.php##: pulls in ##default.conf.php##, but overrides some
|
2011-02-11 23:58:45 +01:00
|
|
|
configuration options to better values for doing development on Phabricator.
|
|
|
|
You probably don't need to even look at this file unless you're making
|
|
|
|
changes to Phabricator itself.
|
2011-02-12 01:12:02 +01:00
|
|
|
- ##production.conf.php##: pulls in ##default.conf.php##, but overrides some
|
2011-02-11 23:58:45 +01:00
|
|
|
configuration options to provide better values for a production install.
|
|
|
|
Once you've completed setup, you should switch to this configuration or
|
|
|
|
one based upon it.
|
2011-02-12 01:12:02 +01:00
|
|
|
- ##setup.conf.php##: pulls in ##default.conf.php##, but sets some flags that
|
|
|
|
make it easier to set up a Phabricator install. Switch away from this before
|
2011-02-11 23:58:45 +01:00
|
|
|
deploying a production install.
|
2011-03-06 23:56:12 +01:00
|
|
|
|
2011-02-11 23:58:45 +01:00
|
|
|
While you can use these templates as-is, you'll probably want to set up custom
|
|
|
|
configuration. To do this, create a new file:
|
|
|
|
|
|
|
|
/path/to/phabricator/conf/custom/myconfig.conf.php
|
2011-03-06 23:56:12 +01:00
|
|
|
|
2011-02-11 23:58:45 +01:00
|
|
|
Put this in the file:
|
|
|
|
|
|
|
|
<?php
|
|
|
|
|
|
|
|
return array(
|
2011-03-06 23:56:12 +01:00
|
|
|
|
2011-02-11 23:58:45 +01:00
|
|
|
// This is just an example.
|
|
|
|
'some.config' => 'some_value',
|
|
|
|
|
|
|
|
) + phabricator_read_config_file('production');
|
|
|
|
|
|
|
|
This will create a new config called "custom/myconfig" which uses the
|
|
|
|
"production" config as the default but allows you to override options. You can
|
|
|
|
select it by editing the VirtualHost or Directory entry you set up when
|
|
|
|
configuring Apache:
|
|
|
|
|
|
|
|
<VirtualHost *>
|
|
|
|
# ...
|
|
|
|
SetEnv PHABRICATOR_ENV custom/myconfig
|
|
|
|
# ...
|
|
|
|
</VirtualHost>
|
2011-03-06 23:56:12 +01:00
|
|
|
|
2011-02-11 23:58:45 +01:00
|
|
|
Now, look through ##default.conf.php## and override any options you want to
|
|
|
|
change by providing overrides in ##myconfig.conf.php##.
|
2011-04-12 01:47:51 +02:00
|
|
|
|
|
|
|
= Upgrading Schema =
|
|
|
|
|
|
|
|
After you have configured Phabricator, you need to upgrade the database
|
|
|
|
schema, see @{article:Upgrading Schema}
|