FAQ › Repository

With Passenger, the Redmine repository browser returns an error (404) for files with the .cgi or .PHP extension

Created on 2009-02-12  •  MAEDA Go

Suppose that you run Redmine with Apache and Passenger, and that CGI execution or PHP is enabled in the virtual host that runs Redmine. In this case, an error (404 Not Found) occurs when you try to display a file with the .cgi or .php extension in the repository browser.

To solve this problem, add php_flag engine off and RemoveHandler .cgi .php to the virtual host of Redmine in the Apache configuration file.

<VirtualHost *>
    ServerName redmine.example.net
    DocumentRoot /some/where/redmine/public

    php_flag engine off
    RemoveHandler .cgi .php
</VirtualHost>

References