Bug 57379 - [patch] Makefile.in with mpm-shared, cgi and cgid add <IfModule ...>
Summary: [patch] Makefile.in with mpm-shared, cgi and cgid add <IfModule ...>
Status: RESOLVED FIXED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Build (show other bugs)
Version: 2.4-HEAD
Hardware: PC FreeBSD
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: FixedInTrunk
Depends on:
Blocks:
 
Reported: 2014-12-20 15:59 UTC by ohauer
Modified: 2016-07-31 09:57 UTC (History)
0 users



Attachments
[patch] Makefile.in (980 bytes, patch)
2014-12-20 15:59 UTC, ohauer
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ohauer 2014-12-20 15:59:36 UTC
Created attachment 32313 [details]
[patch] Makefile.in

If apache 2.4 is build as package with "--enable-mpms-shared=all" and with cgi and cgid the user has to choose if cgi or cgid should be used in httpd.conf.

The patch wraps a <IfModule ...> line around the "LoadModule cgi(d)_module" line so in case both modules are enabled the resulting httpd.conf looks like this.

This works also in case MPM compiled into httpd or only one or none cgi module was chosen.

The patch should work for all *NIX platforms.

...
#LoadModule info_module libexec/apache24/mod_info.so
<IfModule !mpm_prefork_module>
#LoadModule cgid_module libexec/apache24/mod_cgid.so
</IfModule>
<IfModule mpm_prefork_module>
#LoadModule cgi_module libexec/apache24/mod_cgi.so
</IfModule>
#LoadModule dav_fs_module libexec/apache24/mod_dav_fs.so
...
Comment 1 Rainer Jung 2015-01-19 10:42:57 UTC
I changed the patch slightly for the case when only mod_cgid was build and the user had chosen the prefork MPM - which IMHO is allowed. I do first detect whether both modules, mod_cgi and mod_cgid are actually being build and only add the IfModule lines in that case.

Applied to trunk as r1652955 and proposed for 2.4.

Thanks for the contribution.
Comment 2 ohauer 2016-07-31 09:57:46 UTC
Closing this PR since it was merged in r1673909 to 2.4.x