首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Phabricator安装重写规则未正确配置

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

Stack Overflow用户
提问于 2018-03-18 05:27:07
回答 2查看 1.1K关注 0票数 1

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

代码语言:javascript
复制
Request parameter '__path__' is not set. Your rewrite rules are not configured correctly.

当我尝试访问www.cleverbit.com.br/phabricator/webroot/时,将显示此消息。

我配置了一个apache2.conf文件,就像文档建议的那样:

代码语言:javascript
复制
    <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>

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

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-03-26 07:49:28

Apache在Directory语句中没有继承,因此您还需要目录块内的AllowOverride All行作为/var/www/html/phabricator/webroot

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

票数 1
EN

Stack Overflow用户

发布于 2019-03-15 10:58:23

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

代码语言:javascript
复制
    RewriteEngine on
    RewriteRule ^/rsrc/(.*)     -                       [L,QSA]
    RewriteRule ^/favicon.ico   -                       [L,QSA]
    RewriteRule ^(.*)$          /index.php?__path__=$1  [B,L,QSA]

多亏了https://gist.github.com/sparrc/b4eff48a3e7af8411fc1

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49344737

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档