Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 421135 - www-servers/apache-2.4* - add support for mod_proxy_fcgi
Summary: www-servers/apache-2.4* - add support for mod_proxy_fcgi
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Patrick Lauer
Keywords: PATCH
: 447202 (view as bug list)
Depends on:
Reported: 2012-06-14 17:33 UTC by Dan Kozlowski
Modified: 2013-02-27 15:48 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---

diff for =www-server/apache-2.4.2.ebuild (file_421135.txt,1.03 KB, patch)
2012-06-14 17:33 UTC, Dan Kozlowski
Details | Diff
diff for apache 2.4.4 ebuild (apache-2.4.4-mod_fcgi.diff,1005 bytes, patch)
2013-02-27 15:05 UTC, Jaco Kroon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Kozlowski 2012-06-14 17:33:40 UTC
Created attachment 315323 [details, diff]
diff for =www-server/apache-2.4.2.ebuild

The distfile for mod_proxy_fcgi is old and won't compile against apache 2.4. 

As mod_proxy_fcgi is part of apache it can simple be added as an APACHE2_MODULES options. Attached is the diff for =www-server/apache-2.4.2.ebuild
Comment 1 Marios Andreopoulos 2012-10-22 17:45:02 UTC
I tried the proposed patch with www-server/apache-2.4.3 ebuild and proxy_fcgi seems to compile and work ok with dev-lang/php-5.4.7.

If there aren't any known problems, it would be nice for this to make it into the official ebuild.
Comment 2 Tomáš Mózes 2012-11-20 14:51:20 UTC
Tested with Apache 2.4.3 + PHP 5.4.6 fpm, works fine. Please include in the ebuild.
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2012-12-14 16:34:40 UTC
*** Bug 447202 has been marked as a duplicate of this bug. ***
Comment 4 Marios Andreopoulos 2012-12-15 15:58:04 UTC
I think the renaming and re-assignment of this bug, do not help.

This bug isn't about an orphaned package, it is about www-servers/apache.

mod_proxy_fcgi is part of Apache 2.4. It only needs 3 lines on apache's ebuild to be enabled during build time (as a use flag, same as all apache's official modules).
Comment 5 Jaco Kroon 2013-02-11 07:56:38 UTC
Hi Guys,

I'd like to really request that this ticket receives some attention.  Tested on two production systems now, and this is by far one of the best mechanisms I've seen yet to deal with php in a non-mod_php manner.  We really, really want this.  The proposed patch for www-server/apache works well, and I'd like to request that it please be merged into the ebuild as soon as possible.

I've also renamed the bug back to a more descriptive description to what is actually being requested, as well as re-assigned back to - I hope this is in order.
Comment 6 Tomáš Mózes 2013-02-11 08:27:15 UTC
I've been using this in production for 3 months without any problems. Sice it's an official apache module included along with the source code (without any additional hacks), I have no idea why it hasn't been included in the ebuild. Maybe the apache team is waiting to include this in 2.4.4, who knows.
Comment 7 Jaco Kroon 2013-02-18 18:12:40 UTC
Indeed.  Only issue I've picked up is that I can't make php-fpm do http basic auth at all via mod_proxy_fcgi (eg  But that is no reason to NOT include the module.  It's definitely stable, and so far gave me no other problems (and it's probably a config issue too).
Comment 8 Marios Andreopoulos 2013-02-20 00:33:10 UTC
(In reply to comment #7)
> Indeed.  Only issue I've picked up is that I can't make php-fpm do http
> basic auth at all via mod_proxy_fcgi (eg
>  But that is no reason to
> NOT include the module.  It's definitely stable, and so far gave me no other
> problems (and it's probably a config issue too).

A bit off topic but I found the solution just today myself, so I thought I would share it.

The trick to get php-fpm do http basic auth, is to add the necessary rewrite rules to your vhost configuration file. If you add them in your htaccess file or inside <Directory> directives they won't work.

Just add these lines to your vhost configuration:

RewriteEngine On
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

A SabreDAV developer pointed me to this solution:
Comment 9 Jaco Kroon 2013-02-26 07:03:16 UTC
Thanks Marios!  Tested that a few days ago already and it works well, solving that particular issue.  Had to use a slight variation due to other Rewrite rules already being in place (just added the [env=] portion to the existing rewrite rule) but the point is that it works.

Patrick - the provided patch has now been tested by at least two people other than the submitter, both in production environments.  It works.  The module is supported by upstream and is really useful, and significantly more stable and better performing than any other fcgi solution on apache I've seen to date.

I've got a new cluster I need to start rolling out in the next two days and would really appreciate not having to clone the ebuild again, at that time.
Comment 10 Jaco Kroon 2013-02-27 15:05:04 UTC
Created attachment 340358 [details, diff]
diff for apache 2.4.4 ebuild

Updated the diff for the new 2.4.4 ebuild.

Spotted that mod_proxy_scgi is not listed in the MODULE_DEFINES list ... so someone should decide whether or not this needs to be added too at a later stage (probably a new bug).
Comment 11 Tony Vroon (RETIRED) gentoo-dev 2013-02-27 15:48:59 UTC
+*apache-2.4.4-r1 (27 Feb 2013)
+  27 Feb 2013; Tony Vroon <> +apache-2.4.4-r1.ebuild,
+  metadata.xml:
+  Add support for mod_proxy_fcgi; work by Dan Kozlowski rediffed by Jaco Kroon.
+  Testing by Tomas Mozes & Marios Andreopoulos in bug #421135.