Project

General

Profile

Actions

Defect #155

closed

public/.htaccess lacks support for mod_fcgid and adds handlers without checking for their existance

Added by Nils Adermann about 17 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

mod_fcgid is an improved version of mod_fastcgi. It allows the use of "DefaultInitEnv RAILS_ENV production"
in the apache config.

If you try to run redmine with apache and mod_fcgid it will send public/dispatch.fcgi as "text/plain" because
the public/.htaccess connects the .fcgi extension with the "fastcgi-script" handler while fcgid uses
"fcgid-script". Those AddHandler declarations should be inside <IfModule> blocks for the relevant apache
module.


Files

if_module.patch (1.09 KB) if_module.patch Nils Adermann, 2008-02-03 10:53
htaccess_if_module.patch (628 Bytes) htaccess_if_module.patch Stephan Dale, 2009-02-22 00:01
Actions #1

Updated by Jean-Philippe Lang almost 17 years ago

Hi,

You're right, this patch improves the default .htaccess generated
by Rails. It's committed in r934.

mod_fcgid is an improved version of mod_fastcgi.

I know, redmine.org is running with fcgid.

Thanks

Actions #2

Updated by Stephan Dale almost 16 years ago

This patch does not work when the server has multiple (f)cgi modules installed, which is often the case - mod_f/fastcgi alongside mod_cgi.

If you request a file, mod_rewrite will hit the first rule and apply the condition, but then continue on to the second rule and apply it without the condition to serve dispatch.

A solution is to include the condition with every rule. See attached patch.

Actions #3

Updated by Felix Schäfer over 14 years ago

  • Status changed from Reopened to Closed

Stephan Dale wrote:

If you request a file, mod_rewrite will hit the first rule and apply the condition, but then continue on to the second rule and apply it without the condition to serve dispatch.

My understanding is that the [L] at the end of the rewrite rules should stop all processing (of mod_rewrite rules) from there on. Please open a new bug and relate to this one if this is still an issue.

Actions

Also available in: Atom PDF