diff options
author | Rainer Jung <rjung@apache.org> | 2015-01-19 10:32:51 +0000 |
---|---|---|
committer | Rainer Jung <rjung@apache.org> | 2015-01-19 10:32:51 +0000 |
commit | faac8c0c52512f5e8aff5ebaf49f1b7dc4cf308d (patch) | |
tree | 0c1ecbc5b3b5c9969d6e4a9b7c313f4033f0ea25 | |
parent | 07605b2badbc265bda59fcdf0824e766d5dc4668 (diff) | |
download | httpd-faac8c0c52512f5e8aff5ebaf49f1b7dc4cf308d.tar.gz |
PR 57379: If mod_cgi and mod_cgid get installed,
use IfModule for MPM to LoadModule mod_cgi for
prefork and mod_cgid for all other MPMs.
Previously when combined with --enable-load-all-modules
both modules were loaded and it was undefined
which one actually handled cgi requests.
Based on a patch by olli hauer <ohauer gmx.de>.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1652955 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | Makefile.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in index 0f8cf8d51b..fa8b3f0917 100644 --- a/Makefile.in +++ b/Makefile.in @@ -58,6 +58,16 @@ install-conf: -e 's#@@SSLPort@@#$(SSLPORT)#g' \ -e 'p' \ < $$i; \ + if echo " $(DSO_MODULES) "|$(EGREP) " cgi " > /dev/null ; then \ + have_cgi="1"; \ + else \ + have_cgi="0"; \ + fi; \ + if echo " $(DSO_MODULES) "|$(EGREP) " cgid " > /dev/null ; then \ + have_cgid="1"; \ + else \ + have_cgid="0"; \ + fi; \ for j in $(DSO_MODULES) "^EOL^"; do \ if test $$j != "^EOL^"; then \ if echo ",$(ENABLED_DSO_MODULES),"|$(EGREP) ",$$j," > /dev/null ; then \ @@ -68,7 +78,17 @@ install-conf: if test "$(LOAD_ALL_MODULES)" = "yes"; then \ loading_disabled=""; \ fi; \ + if test $$j == "cgid" -a "$$have_cgi" == "1"; then \ + echo "<IfModule !mpm_prefork_module>"; \ + echo " $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + echo "</IfModule>"; \ + elif test $$j == "cgi" -a "$$have_cgid" == "1"; then \ + echo "<IfModule mpm_prefork_module>"; \ + echo " $${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + echo "</IfModule>"; \ + else \ echo "$${loading_disabled}LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ + fi; \ fi; \ done; \ sed -e '1,/@@LoadModule@@/d' \ |