mau
mau

Reputation: 258

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?

Upvotes: 5

Views: 6832

Answers (2)

Talk2Nit
Talk2Nit

Reputation: 1135

I was also facing same issue. Just place

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

and remove following line from your apache2.conf.

RewriteRule ^/rsrc/(.*)     -                       [L,QSA]

RewriteRule ^/favicon.ico   -                       [L,QSA]

Upvotes: 1

Jorge Caballero
Jorge Caballero

Reputation: 749

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
    

Upvotes: 1

Related Questions