CGI

CGI (Common Gateway Interface) is the standard way in which a web server passes a user's data to an application and then returns information to the user. CGI depends on scripts often written in languages such as PHP or Perl to perform the actions that are requested by the user. In order to access the CGI script, the name of the application is indicated in the HTML code.

For example, if you are creating the form, the URL of the script is indicated in the FORMS tag:

<FORM METHOD=POST ACTION=www.myfiles.com/cgi-bin/myprog.pl>

Note: Any Script Language that can pipe output can be used, though - you can have scripts in Shell Script, Python, etc. You just need to configure the correct MIME type, and your favorite scripting language will work in MyServer.

In order to keep all of the CGI scripts in one place, you can place a cgi-bin directory in the web directory in MyServer as seen below:


Web folder
The cgi-bin directory is directly beneath the selected web folder.



However, CGI scripts can be placed anywhere as long as their location is indicated in the HTML code and they are mapped to be CGI through their extension.

CGI scripts that a new process is created for every requests. This can cause some problems with performances but ensure some security as if the new process crashes the main MyServer process is not corrupted.