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:

1. Commented out the 'CGIScriptTimeout' line
2. Run 'a2enmod cgi'
3. 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
4. Run 'lsof /usr/lib/apache2/modules/mod_cgid.so'. This confirms that
   mod_cgid is unused
5. Uncommented the CGIScriptTimeout line
6. 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:

1. Does anyone know what's going on here? Can I use plain mod_cgi with
   Ubuntu 22.04.2 and 2.4.58?
2. Is there actually a problem with running mod_cgid with mpm_prefork?
   I suspect not, but I haven't tested it yet
3. 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.

Reply via email to