Php Phabricator安装。未正确配置重写规则

Php Phabricator安装。未正确配置重写规则,php,apache,apache2,phabricator,Php,Apache,Apache2,Phabricator,我遵循了Phabricator,在安装了所有依赖项之后,我面临以下消息: Request parameter '__path__' is not set. Your rewrite rules are not configured correctly. 当我尝试访问www.cleverbit.com.br/phabricator/webroot/ 我有一个apache2.conf文件,按照文档建议的方式配置: <VirtualHost *> # Change this

我遵循了Phabricator,在安装了所有依赖项之后,我面临以下消息:

Request parameter '__path__' is not set. Your rewrite rules are not configured correctly.
当我尝试访问
www.cleverbit.com.br/phabricator/webroot/

我有一个
apache2.conf
文件,按照文档建议的方式配置:

    <VirtualHost *>
  # Change this to the domain which points to your host.
  ServerName cleverbit.com.br

  # 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 /var/www/html/phabricator/webroot

  RewriteEngine on
  RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]
</VirtualHost>

<Directory />
        Options FollowSymLinks
        AllowOverride All
        Require all denied
</Directory>

<Directory /usr/share>
        AllowOverride All
        Require all granted
</Directory>

<Directory "/var/www/html/phabricator/webroot">
        Require all granted
        AllowOverride All
</Directory>

#将此更改为指向主机的域。
服务器名cleverbit.com.br
#将此更改为选中时放置“phabricator”的路径
#当遵循安装指南时,从GitHub退出。
#
#确保在末尾包含“/webroot”!
DocumentRoot/var/www/html/phabricator/webroot
重新启动发动机
重写规则^(.*)$/index.php?\uuuu路径\uuuuu=$1[B,L,QSA]
选项如下符号链接
允许超越所有
要求全部拒绝
允许超越所有
要求所有授权
要求所有授权
允许超越所有


我的apache重写配置到底出了什么问题?

apache在目录语句中没有继承,因此您还需要
/var/www/html/phabricator/webroot
目录块中的
AllowOverride All


为了避免混淆,我将去掉
/var/www
目录块,除非您有另一个使用它的VirtualHost(在这种情况下,您可能希望将Phabricator从该目录中移出以避免意外创建后门)。

设置以下重写规则为我解决了这个问题

    RewriteEngine on
    RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
    RewriteRule ^/favicon.ico   -                       [L,QSA]
    RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]

多亏了

你安装的是什么操作系统?这是一个Ubuntu 16.04,我按照你的建议做了:同样的问题:(我用新的apache2.confi编辑了我的问题,如果我去看,我会看到一条关于PHP7.0不受支持的消息。你需要使用PHP7.1或更高版本(5.x以前也可以工作,但我不知道情况是否仍然如此)实际上,现在我有一个“[Core Exception/Exception]在您的配置中定义'phabricator.base-uri'以继续。”。因为这不是问题的主要主题,所以我给您一个奖励。@JSON您知道现在这个问题是什么吗?:如果您使用http,您需要显式设置phabricator.base-uri,因为默认情况下是使用https(您应该考虑的——LeSeScript是免费的和易于设置的)。您可以从命令行执行:<代码> /VAR/WW/HTML/PHABICART/BI/CONFIG集合PHBRICALATA.BASE-URI。http://www.cleverbit.com.br/“