This combination (22.04.2/2.4.58) defaults to mpm_prefork. I have a previous (working) Apache config which uses mod_cgid, and which sets 'CGIDScriptTimeout'. Since this is a non-threading prefork system, I've attempted to change 'CGIDScriptTimeout' to 'CGIScriptTimeout'. However, this doesn't work: 'apachectl -M' reports a syntax error at 'CGIScriptTimeout', and Apache doesn't start.
In more detail, I've:
- Commented out the 'CGIScriptTimeout' line
- Run 'a2enmod cgi'
- Run 'lsof /usr/lib/apache2/modules/mod_cgi.so'. This confirms that the mod_cgi file is used by 7 processes; each process has the PID of an Apache2 instance
- Run 'lsof /usr/lib/apache2/modules/mod_cgid.so'. This confirms that mod_cgid is unused
- Uncommented the CGIScriptTimeout line
- Run 'apachectl -M'. This reports a syntax error on the 'CGIScriptTimeout' line
I've also done the reverse: enabled mod_cgid, and replaced the 'CGIScriptTimeout' with 'CGIDScriptTimeout', and confirmed that Apache runs and no syntax errors are reported. In this state, 'lsof' also confirms that mod_cgid.so is being used.
Questions:
- Does anyone know what's going on here? Can I use plain mod_cgi with Ubuntu 22.04.2 and 2.4.58?
- Is there actually a problem with running mod_cgid with mpm_prefork? I suspect not, but I haven't tested it yet
- I'm not entirely sure why this setup defaults to mpm_prefork. I'm running legacy C++ which requires plain CGI, and php, with mod_php (libphp8.3.so). Does libphp actually use mod_cgi[d], or is it using its own comms mechanism? Should I actually care if php is thread-safe or not?
Thanks.
![]() |