Defect #155

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

Added by Nils Adermann about 10 years ago. Updated over 7 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-
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.

if_module.patch Magnifier (1.09 KB) Nils Adermann, 2008-02-03 10:53

htaccess_if_module.patch Magnifier (628 Bytes) Stephan Dale, 2009-02-22 00:01

History

#1 Updated by Jean-Philippe Lang about 10 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

#2 Updated by Stephan Dale almost 9 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.

#3 Updated by Felix Schäfer over 7 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.

Also available in: Atom PDF