Changeset View
Changeset View
Standalone View
Standalone View
src/docs/user/configuration/configuration_guide.diviner
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | <VirtualHost *> | ||||
# Change this to the path where you put 'phabricator' when you checked it | # Change this to the path where you put 'phabricator' when you checked it | ||||
# out from GitHub when following the Installation Guide. | # out from GitHub when following the Installation Guide. | ||||
# | # | ||||
# Make sure you include "/webroot" at the end! | # Make sure you include "/webroot" at the end! | ||||
DocumentRoot /path/to/phabricator/webroot | DocumentRoot /path/to/phabricator/webroot | ||||
RewriteEngine on | RewriteEngine on | ||||
RewriteRule ^/rsrc/(.*) - [L,QSA] | |||||
RewriteRule ^/favicon.ico - [L,QSA] | |||||
RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA] | RewriteRule ^(.*)$ /index.php?__path__=$1 [B,L,QSA] | ||||
</VirtualHost> | </VirtualHost> | ||||
If Apache isn't currently configured to serve documents out of the directory | If Apache isn't currently configured to serve documents out of the directory | ||||
where you put Phabricator, you may also need to add `<Directory />` section. The | where you put Phabricator, you may also need to add `<Directory />` section. The | ||||
syntax for this section depends on which version of Apache you're running. | syntax for this section depends on which version of Apache you're running. | ||||
(If you don't know, you can usually figure this out by running `httpd -v`.) | (If you don't know, you can usually figure this out by running `httpd -v`.) | ||||
For Apache versions older than 2.4, use this: | For Apache versions older than 2.4, use this: | ||||
Show All 25 Lines | server { | ||||
server_name phabricator.example.com; | server_name phabricator.example.com; | ||||
root /path/to/phabricator/webroot; | root /path/to/phabricator/webroot; | ||||
location / { | location / { | ||||
index index.php; | index index.php; | ||||
rewrite ^/(.*)$ /index.php?__path__=/$1 last; | rewrite ^/(.*)$ /index.php?__path__=/$1 last; | ||||
} | } | ||||
location = /favicon.ico { | |||||
try_files $uri =204; | |||||
} | |||||
location /index.php { | location /index.php { | ||||
fastcgi_pass localhost:9000; | fastcgi_pass localhost:9000; | ||||
fastcgi_index index.php; | fastcgi_index index.php; | ||||
#required if PHP was built with --enable-force-cgi-redirect | #required if PHP was built with --enable-force-cgi-redirect | ||||
fastcgi_param REDIRECT_STATUS 200; | fastcgi_param REDIRECT_STATUS 200; | ||||
#variables to make the $_SERVER populate in PHP | #variables to make the $_SERVER populate in PHP | ||||
Show All 19 Lines | |||||
NOTE: Follow these instructions to use lighttpd. To use Apache or niginx, scroll | NOTE: Follow these instructions to use lighttpd. To use Apache or niginx, scroll | ||||
up to their sections. | up to their sections. | ||||
For lighttpd, add a section like this to your lighttpd.conf: | For lighttpd, add a section like this to your lighttpd.conf: | ||||
$HTTP["host"] =~ "phabricator(\.example\.com)?" { | $HTTP["host"] =~ "phabricator(\.example\.com)?" { | ||||
server.document-root = "/path/to/phabricator/webroot" | server.document-root = "/path/to/phabricator/webroot" | ||||
url.rewrite-once = ( | url.rewrite-once = ( | ||||
"^(/rsrc/.*)$" => "$1", | |||||
"^(/favicon.ico)$" => "$1", | |||||
# This simulates QSA ("query string append") mode in apache | # This simulates QSA ("query string append") mode in apache | ||||
"^(/[^?]*)\?(.*)" => "/index.php?__path__=$1&$2", | "^(/[^?]*)\?(.*)" => "/index.php?__path__=$1&$2", | ||||
"^(/.*)$" => "/index.php?__path__=$1", | "^(/.*)$" => "/index.php?__path__=$1", | ||||
) | ) | ||||
} | } | ||||
You should also ensure the following modules are listed in your | You should also ensure the following modules are listed in your | ||||
server.modules list: | server.modules list: | ||||
▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines |