CGI Proxy - Common Gateway Interface Proxy ============================================ .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is CGI?** CGI stands for Common Gateway Interface. It is a standard protocol used by web servers to interface with executable programs (scripts or binaries) to generate dynamic content on web pages. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is CGI useful?** * Enables the generation of dynamic web content. * Allows web servers to execute external scripts or applications (e.g., in Python, Perl, C). * Facilitates form handling, database interaction, and content customization. * Can integrate legacy applications with modern web servers. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * A user requests a web page that uses CGI (e.g., a `.cgi` or `.pl` script). * The web server receives the request and invokes the CGI program. * The program processes input (such as form data) and generates output, usually HTML. * The server sends this output back to the user's browser as the HTTP response. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is CGI used?** * In early dynamic websites and legacy systems. * For simple form handling or server-side scripting tasks. * In systems where lightweight or custom server scripting is required. * Still used in some internal tools or embedded systems. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * CGI operates at the **Application Layer (Layer 7)** of the OSI model. * It is invoked by web servers (like Apache or Nginx) to serve HTTP requests with dynamic content. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS CGI windows specific?** * No, CGI is not Windows-specific. * It is supported on both Windows and Unix-like systems, including Linux and macOS. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS CGI Linux Specific?** * No, CGI is not Linux-specific. * Though it is commonly used in Linux web environments, it is cross-platform and works wherever a compatible web server and interpreter are available. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`CGI Version&IEEE Details ` * :ref:`CGI Basic Setup on Ubuntu using IPv4 ` * :ref:`CGI Basic Setup on Ubuntu using IPv6 ` * :ref:`CGI Protocol Packet Details ` * :ref:`CGI Usecases ` * :ref:`CGI Basic Features ` * :ref:`Reference links ` .. _CGI_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _CGI_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _CGI_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _CGI_step5: .. tab-set:: .. tab-item:: CGI Version&RFC Details * rfc details .. _CGI_step18: .. tab-set:: .. tab-item:: CGI Basic Setup on Ubuntu using IPv4 * setup .. _CGI_step19: .. tab-set:: .. tab-item:: CGI Basic Setup on Ubuntu using IPv6 * setup .. _CGI_step6: .. tab-set:: .. tab-item:: CGI Protocol Packet Details * packet details .. _CGI_step7: .. tab-set:: .. tab-item:: CGI Usecases * usecases .. _CGI_step8: .. tab-set:: .. tab-item:: CGI Basic Features * features .. _CGI_step17: .. tab-set:: .. tab-item:: Reference links * Reference links