Where is the mod_cgi.c script, or where are all the modules in the apache software?

I have a problem with the RLimitNProc settings on my server, because this settings don't work properly. I've found in the deep of the internet that there is a bug in the apache 2.2 software, exactly in mod_cgi.c script, but I can't find that script wether on the server nor on a fresh downloaded apache 2.2. software.

I have just found the mod_cgi.so file, but the .so files are not intended to being changed...

I'm running CentOS 5.8

Thanks in advance. Regards, John.

2 Answers 2


The file mod_cgi.c isn't a script, it's a C source file. You can find the CentOS 5.8 version in the SRPM.


mod_cgi.c is not a script. It is C source code. You would need to download the source code, not the compiled software.

Changing the source code for such a complex system is something you probably shouldn't do unless you are very familiar with C indeed. I'd strongly suggest that you look for a version of apache that doesn't have the bug in question; if none exists, wait a little. Also, many bugs have workarounds that can be made in the server configuration to disable the exploit. If you were to add information about the bug, we might be able to help you.

  • thanks. the question with my problem is here, and i found this "solution" (don't know if it's a solution for my problem) Mar 21, 2013 at 10:33
  • On the bug report page, it says "fixed in 2.4.4". So upgrading to that version should fix your problem. If it doesn't, you can download the SRPM as Iain suggested, patch the file yourself with the patch from the Apache page, and then compile it.
    – Jenny D
    Mar 21, 2013 at 10:51
  • yes, thanks. i will prefer to update to 2.4.4, but i found it interesting for myself to check if my "mod_cgi.c" is corrupted or not :) regards Mar 21, 2013 at 10:52
  • Looking at source code is always interesting :-)
    – Jenny D
    Mar 21, 2013 at 11:31
  • @JennyD: aye, and the source code for the C5.8 version of mod_cgi.c doesn't have the code listed in the OPs 'solution'.
    – user9517
    Mar 21, 2013 at 12:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .