SlideShare a Scribd company logo
What is CGI
• The Common Gateway Interface, or CGI, is a set
of standards that define how information is
exchanged between the web server and a custom
script.
• The CGI specs are currently maintained by the
NCSA and NCSA defines CGI is as follows:
• The Common Gateway Interface, or CGI, is a
standard for external gateway programs to
interface with information servers such as HTTP
servers.
• The current version is CGI/1.1 and CGI/1.2 is
under progress.
CGI Architecture Diagram
CGI Architecture Diagram
• Your browser contacts the HTTP web server
and demand for the URL ie. filename.
• Web Server will parse the URL and will look for
the filename in if it finds that file then sends
back to the browser otherwise sends an error
message indicating that you have requested a
wrong file.
• Web browser takes response from web server
and displays either the received file or error
message.
• It is possible to set up the HTTP server so that
whenever a file in a certain directory is
requested that file is not sent back; instead it
is executed as a program, and whatever that
program outputs is sent back for your browser
to display.
• This function is called the Common Gateway
Interface or CGI and the programs are called
CGI scripts. These CGI programs can be a PERL
Script, Shell Script, C or C++ program etc.
Web Server Support & Configuration
• Before you proceed with CGI Programming,
make sure that your Web Server supports CGI
and it is configured to handle CGI Programs.
• All the CGI Programs be executed by the HTTP
server are kept in a pre-configured directory.
• This directory is called CGI Directory and by
convention it is named as /cgi-bin.
• By convention PERL CGI files will have
extention as .cgi.
CGI Environment Variables
Cgi

More Related Content

What's hot

Cs6703 grid and cloud computing unit 3
Cs6703 grid and cloud computing unit 3Cs6703 grid and cloud computing unit 3
Cs6703 grid and cloud computing unit 3
RMK ENGINEERING COLLEGE, CHENNAI
 
Eucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebulaEucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebula
Amar Myana
 
Networking in cloud computing
Networking in cloud computingNetworking in cloud computing
Networking in cloud computing
Barani Tharan
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controlsRaed Aldahdooh
 
NIST Cloud Computing Reference Architecture
NIST Cloud Computing Reference ArchitectureNIST Cloud Computing Reference Architecture
NIST Cloud Computing Reference Architecture
Thanakrit Lersmethasakul
 
Cloud sim
Cloud simCloud sim
Cloud sim
Khyati Rajput
 
Cloud Computing Architecture
Cloud Computing ArchitectureCloud Computing Architecture
Cloud Computing Architecture
Animesh Chaturvedi
 
Vision of cloud computing
Vision of cloud computingVision of cloud computing
Vision of cloud computing
gaurav jain
 
Virtualization in cloud computing
Virtualization in cloud computingVirtualization in cloud computing
Virtualization in cloud computing
Mohammad Ilyas Malik
 
JINI Technology
JINI TechnologyJINI Technology
JINI Technology
Rachna Singh
 
Multimedia synchronization
Multimedia synchronizationMultimedia synchronization
Multimedia synchronization
I World Tech
 
Publish subscribe model overview
Publish subscribe model overviewPublish subscribe model overview
Publish subscribe model overviewIshraq Al Fataftah
 
Cloud computing and utility computing
Cloud computing and utility computingCloud computing and utility computing
Cloud computing and utility computingasmita tarar
 
Session tracking in servlets
Session tracking in servletsSession tracking in servlets
Session tracking in servlets
vishal choudhary
 
Introduction to Aneka, Aneka Model is explained
Introduction to Aneka, Aneka Model is explainedIntroduction to Aneka, Aneka Model is explained
Introduction to Aneka, Aneka Model is explained
Dr Neelesh Jain
 
Naming in Distributed System
Naming in Distributed SystemNaming in Distributed System
Naming in Distributed System
MNM Jain Engineering College
 
Front end web development
Front end web developmentFront end web development
Front end web development
viveksewa
 
Key Challenges In CLOUD COMPUTING
Key Challenges In CLOUD COMPUTINGKey Challenges In CLOUD COMPUTING
Key Challenges In CLOUD COMPUTING
Atul Chounde
 

What's hot (20)

Cs6703 grid and cloud computing unit 3
Cs6703 grid and cloud computing unit 3Cs6703 grid and cloud computing unit 3
Cs6703 grid and cloud computing unit 3
 
Cloud Reference Model
Cloud Reference ModelCloud Reference Model
Cloud Reference Model
 
Eucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebulaEucalyptus, Nimbus & OpenNebula
Eucalyptus, Nimbus & OpenNebula
 
Networking in cloud computing
Networking in cloud computingNetworking in cloud computing
Networking in cloud computing
 
Asp.net server controls
Asp.net server controlsAsp.net server controls
Asp.net server controls
 
NIST Cloud Computing Reference Architecture
NIST Cloud Computing Reference ArchitectureNIST Cloud Computing Reference Architecture
NIST Cloud Computing Reference Architecture
 
Cloud sim
Cloud simCloud sim
Cloud sim
 
Cloud Computing Architecture
Cloud Computing ArchitectureCloud Computing Architecture
Cloud Computing Architecture
 
Vision of cloud computing
Vision of cloud computingVision of cloud computing
Vision of cloud computing
 
Virtualization in cloud computing
Virtualization in cloud computingVirtualization in cloud computing
Virtualization in cloud computing
 
JINI Technology
JINI TechnologyJINI Technology
JINI Technology
 
Multimedia synchronization
Multimedia synchronizationMultimedia synchronization
Multimedia synchronization
 
Publish subscribe model overview
Publish subscribe model overviewPublish subscribe model overview
Publish subscribe model overview
 
Cloud computing and utility computing
Cloud computing and utility computingCloud computing and utility computing
Cloud computing and utility computing
 
Session tracking in servlets
Session tracking in servletsSession tracking in servlets
Session tracking in servlets
 
Introduction to Aneka, Aneka Model is explained
Introduction to Aneka, Aneka Model is explainedIntroduction to Aneka, Aneka Model is explained
Introduction to Aneka, Aneka Model is explained
 
Ajax and Jquery
Ajax and JqueryAjax and Jquery
Ajax and Jquery
 
Naming in Distributed System
Naming in Distributed SystemNaming in Distributed System
Naming in Distributed System
 
Front end web development
Front end web developmentFront end web development
Front end web development
 
Key Challenges In CLOUD COMPUTING
Key Challenges In CLOUD COMPUTINGKey Challenges In CLOUD COMPUTING
Key Challenges In CLOUD COMPUTING
 

Viewers also liked

Common gateway interface
Common gateway interfaceCommon gateway interface
Common gateway interfaceAnandita
 
CGI Presentation
CGI PresentationCGI Presentation
CGI Presentation
Sopan Shewale
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
vijayta
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
AakankshaR
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
Michael Jhon
 
Computer Generated Imagery (CGI)
Computer Generated Imagery (CGI)Computer Generated Imagery (CGI)
Computer Generated Imagery (CGI)
Pribhat Sharma
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
teach4uin
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
Diane Phillips Krebs
 

Viewers also liked (11)

Common gateway interface
Common gateway interfaceCommon gateway interface
Common gateway interface
 
Common Gateway Interface
Common Gateway InterfaceCommon Gateway Interface
Common Gateway Interface
 
CGI Presentation
CGI PresentationCGI Presentation
CGI Presentation
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)Cascading Style Sheet (CSS)
Cascading Style Sheet (CSS)
 
Cascading style sheet
Cascading style sheetCascading style sheet
Cascading style sheet
 
Computer Generated Imagery (CGI)
Computer Generated Imagery (CGI)Computer Generated Imagery (CGI)
Computer Generated Imagery (CGI)
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 
CGI Introduction
CGI IntroductionCGI Introduction
CGI Introduction
 
Cgi
CgiCgi
Cgi
 
Scripting languages
Scripting languagesScripting languages
Scripting languages
 

Similar to Cgi

Apache2 BootCamp : Serving Dynamic Content with CGI
Apache2 BootCamp : Serving Dynamic Content with CGIApache2 BootCamp : Serving Dynamic Content with CGI
Apache2 BootCamp : Serving Dynamic Content with CGIWildan Maulana
 
Servlet programming
Servlet programmingServlet programming
Servlet programming
Mallikarjuna G D
 
Servlet programming
Servlet programmingServlet programming
Servlet programming
Mallikarjuna G D
 
Ecom 1
Ecom 1Ecom 1
Common Gateway Interface ppt
Common Gateway Interface pptCommon Gateway Interface ppt
Common Gateway Interface ppt
OECLIB Odisha Electronics Control Library
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Serverwebhostingguy
 
15.web document types.pdf bdgjrjdhdhsgbdidh
15.web document types.pdf bdgjrjdhdhsgbdidh15.web document types.pdf bdgjrjdhdhsgbdidh
15.web document types.pdf bdgjrjdhdhsgbdidh
KomaliGuptha1
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postvamsitricks
 
Web Server - Internet Applications
Web Server - Internet ApplicationsWeb Server - Internet Applications
Web Server - Internet Applications
sandra sukarieh
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postvamsi krishna
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postvamsitricks
 
Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)
Gera Paulos
 
Comman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptxComman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptx
JebastinRaj1
 
WEB-DBMS A quick reference
WEB-DBMS A quick referenceWEB-DBMS A quick reference
WEB-DBMS A quick referenceMarc Dy
 
Cache control directive
Cache control directiveCache control directive
Cache control directiveMohamed Mamoon
 
Cs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT VCs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT V
pkaviya
 

Similar to Cgi (20)

Cgi
CgiCgi
Cgi
 
Apache2 BootCamp : Serving Dynamic Content with CGI
Apache2 BootCamp : Serving Dynamic Content with CGIApache2 BootCamp : Serving Dynamic Content with CGI
Apache2 BootCamp : Serving Dynamic Content with CGI
 
Servlet programming
Servlet programmingServlet programming
Servlet programming
 
Servlet programming
Servlet programmingServlet programming
Servlet programming
 
Ecom 1
Ecom 1Ecom 1
Ecom 1
 
Python cgi programming
Python cgi programmingPython cgi programming
Python cgi programming
 
Common Gateway Interface ppt
Common Gateway Interface pptCommon Gateway Interface ppt
Common Gateway Interface ppt
 
Configuring the Apache Web Server
Configuring the Apache Web ServerConfiguring the Apache Web Server
Configuring the Apache Web Server
 
15.web document types.pdf bdgjrjdhdhsgbdidh
15.web document types.pdf bdgjrjdhdhsgbdidh15.web document types.pdf bdgjrjdhdhsgbdidh
15.web document types.pdf bdgjrjdhdhsgbdidh
 
introduction to web application development
introduction to web application developmentintroduction to web application development
introduction to web application development
 
CGI by rj
CGI by rjCGI by rj
CGI by rj
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
Web Server - Internet Applications
Web Server - Internet ApplicationsWeb Server - Internet Applications
Web Server - Internet Applications
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
Servletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,postServletarchitecture,lifecycle,get,post
Servletarchitecture,lifecycle,get,post
 
Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)Servlets as introduction (Advanced programming)
Servlets as introduction (Advanced programming)
 
Comman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptxComman Gateway interface Java cgi pro.pptx
Comman Gateway interface Java cgi pro.pptx
 
WEB-DBMS A quick reference
WEB-DBMS A quick referenceWEB-DBMS A quick reference
WEB-DBMS A quick reference
 
Cache control directive
Cache control directiveCache control directive
Cache control directive
 
Cs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT VCs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT V
 

More from Abhishek Kesharwani

uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
Abhishek Kesharwani
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
Abhishek Kesharwani
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
Abhishek Kesharwani
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
Abhishek Kesharwani
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
Abhishek Kesharwani
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
Abhishek Kesharwani
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
Abhishek Kesharwani
 
Unit 1 web technology uptu slide
Unit 1 web technology uptu slideUnit 1 web technology uptu slide
Unit 1 web technology uptu slide
Abhishek Kesharwani
 
Unit1 Web Technology UPTU UNIT 1
Unit1 Web Technology UPTU UNIT 1 Unit1 Web Technology UPTU UNIT 1
Unit1 Web Technology UPTU UNIT 1
Abhishek Kesharwani
 
Unit1 2
Unit1 2 Unit1 2
Web Technology UPTU UNIT 1
Web Technology UPTU UNIT 1 Web Technology UPTU UNIT 1
Web Technology UPTU UNIT 1
Abhishek Kesharwani
 
Mtech syllabus computer science uptu
Mtech syllabus computer science uptu Mtech syllabus computer science uptu
Mtech syllabus computer science uptu
Abhishek Kesharwani
 

More from Abhishek Kesharwani (20)

uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
uptu web technology unit 2 html
uptu web technology unit 2 htmluptu web technology unit 2 html
uptu web technology unit 2 html
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 
uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2uptu web technology unit 2 Xml2
uptu web technology unit 2 Xml2
 
Unit 1 web technology uptu slide
Unit 1 web technology uptu slideUnit 1 web technology uptu slide
Unit 1 web technology uptu slide
 
Unit1 Web Technology UPTU UNIT 1
Unit1 Web Technology UPTU UNIT 1 Unit1 Web Technology UPTU UNIT 1
Unit1 Web Technology UPTU UNIT 1
 
Unit1 2
Unit1 2 Unit1 2
Unit1 2
 
Web Technology UPTU UNIT 1
Web Technology UPTU UNIT 1 Web Technology UPTU UNIT 1
Web Technology UPTU UNIT 1
 
Mtech syllabus computer science uptu
Mtech syllabus computer science uptu Mtech syllabus computer science uptu
Mtech syllabus computer science uptu
 
Wi max tutorial
Wi max tutorialWi max tutorial
Wi max tutorial
 
Virtual lan
Virtual lanVirtual lan
Virtual lan
 
Virtual lan
Virtual lanVirtual lan
Virtual lan
 
Tcp traffic control and red ecn
Tcp traffic control and red ecnTcp traffic control and red ecn
Tcp traffic control and red ecn
 

Cgi

  • 1. What is CGI • The Common Gateway Interface, or CGI, is a set of standards that define how information is exchanged between the web server and a custom script. • The CGI specs are currently maintained by the NCSA and NCSA defines CGI is as follows: • The Common Gateway Interface, or CGI, is a standard for external gateway programs to interface with information servers such as HTTP servers. • The current version is CGI/1.1 and CGI/1.2 is under progress.
  • 3. CGI Architecture Diagram • Your browser contacts the HTTP web server and demand for the URL ie. filename. • Web Server will parse the URL and will look for the filename in if it finds that file then sends back to the browser otherwise sends an error message indicating that you have requested a wrong file. • Web browser takes response from web server and displays either the received file or error message.
  • 4. • It is possible to set up the HTTP server so that whenever a file in a certain directory is requested that file is not sent back; instead it is executed as a program, and whatever that program outputs is sent back for your browser to display. • This function is called the Common Gateway Interface or CGI and the programs are called CGI scripts. These CGI programs can be a PERL Script, Shell Script, C or C++ program etc.
  • 5. Web Server Support & Configuration • Before you proceed with CGI Programming, make sure that your Web Server supports CGI and it is configured to handle CGI Programs. • All the CGI Programs be executed by the HTTP server are kept in a pre-configured directory. • This directory is called CGI Directory and by convention it is named as /cgi-bin. • By convention PERL CGI files will have extention as .cgi.