{"thread":{"id":"21069","subject":"[PATCH] instaweb: support mod_cgid for apache2","startedAt":"2009-09-26T18:12:32Z","lastAt":"2009-09-26T18:12:32Z","messageCount":1,"participants":["Mark Rada"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"123852","messageId":"4ABE5990.2060902@mailservices.uwaterloo.ca","threadId":"21069","inReplyTo":null,"subject":"[PATCH] instaweb: support mod_cgid for apache2","fromName":"Mark Rada","fromEmail":"marada@uwaterloo.ca","sentAt":"2009-09-26T18:12:32Z","receivedAt":"2009-09-26T18:12:32Z","isPatch":true,"sender":{"key":"marada@uwaterloo.ca","avatar":"https://avatars.githubusercontent.com/u/38430?v=4"},"body":"Some people have mod_cgid instead of mod_cgi, most likely as a result of\nchoosing a threaded MPM.\n\nIn cases where the user has both modules, mod_cgi will be preferred in\norder to maintain a simpler setup.\n\nThis patch also causes instaweb to print a message and die in cases\nwhere there is no module that instaweb knows how to handle.\n\nSigned-off-by: Mark Rada <marada@uwaterloo.ca>\n---\n\n\tI thought I would squeeze this patch in while I was at it today.\n\n\n git-instaweb.sh |   16 +++++++++++++++-\n 1 files changed, 15 insertions(+), 1 deletions(-)\n\ndiff --git a/git-instaweb.sh b/git-instaweb.sh\nindex d96eddb..622a5f0 100755\n--- a/git-instaweb.sh\n+++ b/git-instaweb.sh\n@@ -317,7 +317,21 @@ EOF\n \t\tresolve_full_httpd\n \t\tlist_mods=$(echo \"$full_httpd\" | sed \"s/-f$/-l/\")\n \t\t$list_mods | grep 'mod_cgi\\.c' >/dev/null 2>&1 || \\\n-\t\techo \"LoadModule cgi_module $module_path/mod_cgi.so\" >> \"$conf\"\n+\t\tif test -f \"$module_path/mod_cgi.so\"\n+\t\tthen\n+\t\t\techo \"LoadModule cgi_module $module_path/mod_cgi.so\" >> \"$conf\"\n+\t\telse\n+\t\t\t$list_mods | grep 'mod_cgid\\.c' >/dev/null 2>&1 || \\\n+\t\t\tif test -f \"$module_path/mod_cgid.so\"\n+\t\t\tthen\n+\t\t\t\techo \"LoadModule cgid_module $module_path/mod_cgid.so\" \\\n+\t\t\t\t\t>> \"$conf\"\n+\t\t\telse\n+\t\t\t\techo \"You have no CGI support!\"\n+\t\t\t\texit 2\n+\t\t\tfi\n+\t\t\techo \"ScriptSock logs/gitweb.sock\" >> \"$conf\"\n+\t\tfi\n \t\tcat >> \"$conf\" <<EOF\n AddHandler cgi-script .cgi\n <Location /gitweb.cgi>\n-- \n1.6.4.GIT\n"}]}