LoadModule fcgid_module modules/mod_fcgid.so<IfmoduleFcgid_module>AddHandler fcgid-script. exe. CGI</Ifmodule><Directory"${srvroot}/cgi-bin">Require All granted</Directory>#ScriptAlias/"${srvroot}/cgi-bin/" scriptalias/bin/"${srvroot}/cgi-bin/" Scriptalias/echo "${srvroot}/cgi-bin /echo-cpp.exe "
1,LoadModule fcgid_module modules/mod_fcgid.so, load module, note The default CGI module commented out.
2. The project with the end of. exe,. CGI uses fcgi processing. Note You must be an executable file. Similar to Linux under the program, the suffix is just an identity, you can change the abc.exe to abc.cgi.
For files that do not have a handler defined, Apache reads its contents directly and returns.
3. You can map a directory to the "${srvroot}/cgi-bin/" directory, such as /bin/in your code. This allows access to all files under the cgi-bin directory. Files that have the. exe and . CGI endings will be executed after the result is returned.
4.Directory access permissions are recursive to sub-files. If there is "${srvroot}/cgi-bin/subdir/test" this file, in the URL can be accessed through /bin/subdir/test .
5, if the configuration of scriptalias/ "${srvroot}/cgi-bin/" then the following two Scriptalias will be affected, In turn, it becomes an invalid configuration.
At this time,/bin/test will be interpreted as "${srvroot}/cgi-bin/bin/test";/echo will be interpreted as "${srvroot}/ cgi-bin/echo" but none of these two files exist.
apache2.4 fcgi Minimum Configuration