1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Document nginx, s3 storage in Phabricator

Summary: Add nginx documentation and s3 documentation and some other doc tweaks.

Test Plan: Generated, read documentation.

Reviewers: btrahan, jungejason

Reviewed By: btrahan

CC: aran, wnemay

Maniphest Tasks: T638

Differential Revision: https://secure.phabricator.com/D1426
This commit is contained in:
epriestley 2012-01-16 16:05:00 -08:00
parent b35ea500cc
commit 5f1438354b
3 changed files with 73 additions and 9 deletions

View file

@ -28,6 +28,7 @@ Create a new file here:
...where ##myconfig## is some name which identifies your installation. Put this ...where ##myconfig## is some name which identifies your installation. Put this
in the file: in the file:
name=myconfig.conf.php, lang=php
<?php <?php
return array( return array(
@ -58,7 +59,7 @@ For the last line, you can also use ##'development'## instead of
##'production'## if you are planning to develop Phabricator itself. This will ##'production'## if you are planning to develop Phabricator itself. This will
turn on some debugging features. turn on some debugging features.
= Configuring Apache = = Webserver: Configuring Apache =
Get Apache running and verify it's serving a test page. Consult the 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, documentation for help. Make sure ##mod_php## and ##mod_rewrite## are enabled,
@ -75,6 +76,7 @@ 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 or edit the Directory entry for the DocumentRoot. It should look something like
this: this:
name=httpd.conf
<VirtualHost *> <VirtualHost *>
# Change this to the domain which points to your host, i.e. the domain # Change this to the domain which points to your host, i.e. the domain
# you set as "phabricator.base-uri". # you set as "phabricator.base-uri".
@ -94,9 +96,60 @@ this:
SetEnv PHABRICATOR_ENV custom/myconfig SetEnv PHABRICATOR_ENV custom/myconfig
</VirtualHost> </VirtualHost>
Now, restart apache and navigate to whichever subdomain you set up. You should Continue to "Setup" below.
either see the Phabricator setup screen, which is a simple text page that looks
something like this: = Webserver: Configuring nginx =
For nginx, use a configuration like this:
name=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 ~ \.php$ {
fastcgi_pass localhost:9000;
fastcgi_index index.php;
#custom environment variable
fastcgi_param PHABRICATOR_ENV "custom/myconfig";
#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;
}
}
= Setup =
Now, restart your webserver and navigate to whichever subdomain you set up. You
should either see the Phabricator setup screen, which is a simple text page that
looks something like this:
PHABRICATOR SETUP PHABRICATOR SETUP

View file

@ -60,6 +60,17 @@ storage. To do this, set the configuration key:
- ##storage.local-disk.path##: Set to some writable directory on local disk. - ##storage.local-disk.path##: Set to some writable directory on local disk.
Make that directory. You're done. Make that directory. You're done.
== Amazon S3 ==
- **Pros**: Scales well.
- **Cons**: More complicated and expensive than other approaches.
To enable file storage in S3, set these key:
- ##amazon-s3.access-key## Your AWS access key.
- ##amazon-s3.secret-key## Your AWS secret key.
- ##storage.s3.bucket## S3 bucket name where files should be stored.
== Custom Engine == == Custom Engine ==
For details about writing a custom storage engine, see @{article:File Storage For details about writing a custom storage engine, see @{article:File Storage

View file

@ -14,8 +14,8 @@ Phabricator is a LAMP application suite, so you basically need LAMP:
patches.) Phabricator has active contributors running it on Mac OS X, Amazon patches.) Phabricator has active contributors running it on Mac OS X, Amazon
Linux, Ubuntu, RHEL and CentOS; if you run into issues on other flavors, Linux, Ubuntu, RHEL and CentOS; if you run into issues on other flavors,
send patches or complaints. send patches or complaints.
- **Apache**: You need Apache. You might be able to use something else, but - **Apache** (or nginx): You need Apache (or nginx). You might be able to use
you're on your own. something else, but you're on your own.
- **MySQL**: You need MySQL. - **MySQL**: You need MySQL.
- **PHP**: You need PHP 5.2 or newer. - **PHP**: You need PHP 5.2 or newer.
@ -38,11 +38,11 @@ If those work for you, you can skip directly to the
Otherwise, here's a general description of what you need to install: Otherwise, here's a general description of what you need to install:
- git (usually called "git" in package management systems) - git (usually called "git" in package management systems)
- Apache (usually "httpd" or "apache2") - Apache (usually "httpd" or "apache2") (or nginx)
- MySQL Server (usually "mysqld" or "mysql-server") - MySQL Server (usually "mysqld" or "mysql-server")
- PHP (usually "php") - PHP (usually "php")
- Required PHP extensions: mbstring, iconv, mysql, curl, pcntl (these might be something like - Required PHP extensions: mbstring, iconv, mysql, curl, pcntl (these might be
"php-mysql" or "php5-mysql") something like "php-mysql" or "php5-mysql")
- Optional PHP extensions: gd, apc (special instructions for APC are available - Optional PHP extensions: gd, apc (special instructions for APC are available
below if you have difficulty installing it), xhprof (instructions below, below if you have difficulty installing it), xhprof (instructions below,
you only need this if you are developing Phabricator) you only need this if you are developing Phabricator)