What is cgi?

Source: Internet
Author: User
What is cgi? I found some cgi information, but I still cannot fully understand it.
Who can combine the web development history to talk about the relationship between cgi and web servers (APACHE, iis) and php.


Reply to discussion (solution)

Common GatewayInterface (CGI) is one of the most important technologies in WWW technology and plays an irreplaceable role. CGI is the interface standard between external applications (CGI programs) and Web servers. it is the procedure for transmitting information between CGI programs and Web servers. CGI specifications allow the Web server to execute external programs and send their output to the Web browser. CGI converts a simple set of static hypermedia documents on the Web into a complete new interactive media.

Can the moderator give an image point,
Or a metaphor ..

Cig is a protocol that describes information exchange between web servers (such as nginx and apache) and application gateway (such as php and python.

Generally, when the web server receives a file request from the browser, it sends the file requested by the browser to the browser and reports

File type sent by the browser. However, if the browser requests not a file, that is, the URL points to a program (or script ),

The Web server will first execute this program, and then send the output result of the program to the browser like a file. Any,

Programs executed by the Web server that can receive or send information from the Web server to the Web server are called CGI programs. CGI program and Web

The server is independent and can be executed on any Web server (any specific web server can be executed ).


This picture is very simple, but it can explain the problem

Cgi is just a specification, and there is no actual thing (or program) called cgi.

To put it simply, cgi specifies what the web server will input to the (cgi-supported) application and what output the application can process.

Is a set of specifications.

You need to open a restaurant, but opening a restaurant requires a series of procedures, such as photo taking, purchase channels, house rental, and employee recruitment. This can also be regarded as a set of standards, you can start it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.