Enable mod_cgid to use CGI programs
If you want to use CGI programs, enable mod_cgid.
Perform this step if you have a CGI program and need to run it.
For new Web system development, we recommend a development method that can support real-time Web / cloud servers.
Enable mod_cgid
mod_cgid is an Apache module, but to enable the Apache module, use the a2enmod command.
sudo a2enmod cgid
After enabling it, you need to restart Apache.
Directory where CGI can be executed
The directories where CGI can be executed are the following directories.
/ usr / lib / cgi-bin /
If you place the CGI program in it and give it execute permission, you can call the CGI program from a web browser.
However, in general, it is more likely that static files such as images and CGI programs will be placed together in / var / www / html.
In this case, you need to make additional settings.
The location to set this is the default virtual host configuration file.
Difference between mod_cgi and mod_cgid
From the user's point of view, mod_cgid seems to behave the same as mod_cgid, with one exception. It seems good to choose mod_cgid, which has a low cost.