Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phabricator rewrite rules configuring issue

I'm having trouble installing phabricator. It actually seems like it would be a simple thing. I copied the example code exactly.

apache2.conf:

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

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

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


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

Whenever I go to the server IP on a browser, it gives me this error:

Request parameter '__path__' is not set. Your rewrite rules are not configured correctly.

I found that this was part of the phabricator code:

if (!isset($_REQUEST['__path__'])) {
    self::didFatal(
        "Request parameter '__path__' is not set. Your rewrite rules ".
        "are not configured correctly.");
}

Anyone have any idea how to get past this?

like image 513
mau Avatar asked Oct 31 '22 18:10

mau


1 Answers

I had a similar issue with Phab and solved it with the following:

  1. Place the Directory segment inside the VirtualHost segment.
  2. Are you running any other Virtual Server in your system? If so, specify the port *:80 (Or try a different one Remember adding Listen 8081 before declaring the VirtualHost segment if you try another port)
  3. And last replace the content of the Directory segment with this:

    Order allow,deny
    Allow from all
    
like image 154
Jorge Caballero Avatar answered Nov 03 '22 06:11

Jorge Caballero