1) 转到 /etc/apache2/sites-available。删除所有 *.conf 文件。
2)在这里创建phabricator.conf文件,内容如下:
<VirtualHost *>
# Change this to the domain which points to your host.
ServerName yourservername
# 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]
<Directory "/path/to/phabricator/webroot">
Require all granted
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
3) 确保在 phabricator.conf 中输入正确的 phabricator 目录路径。
4) 转到 /etc/apache2/sites-enabled。删除所有符号链接。
5) 执行以下命令:
sudo a2ensite phabricator
sudo service apache2 restart