Web Server
Content What is web server Web Server working concept ◦ Static document ◦ Dynamic document ◦ Client side Processing Easy Web Server Programing
Content Web Server installation ◦ Web Server Structure Web Server configuration ◦ Virtual Web hosting ◦ Server Side Include ◦ Comment Gateway Interface ◦ CGI VS FastCGI Question & Answer
What is Web Server
History of web server 1989 Tim Berners-Lee employee ofTim Berners-Lee CERN (European Organization for Nuclear Research) Work on HTTP (Hypertext Transfer Protocol) ◦ HTTP V 0.9 (1991) ◦ HTTP WG 1995 ◦ HTTP V 1.1 (1996) RFC 1945 ◦ HTTP V 1.1 (1999) RFC 2616
Web Server Working Concept Client – Server Network Concept Resource Type On Server ◦ Static document ◦ Dynamic document Client side Processing
Static Document Resource
Dynamic Document Resource
Client Processing
Popular Web Server Apache Web Server Microsoft Internet Information Services Nginx (engine-x)
All Web Server Market Share from NetCraft
Active Web Server Market Share from NetCraft
Active Web Server from NetCraft
Easy Web Server Programming with Node.js var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(1337, ' '); console.log('Server running at node example.js
How to Apache Web Server Installation Web Server Only # yum install httpd Web Server with php # yum install httpd php php-common
Configuration VirtualHost NameVirtualHost *:80 DocumentRoot /www/docs/ ServerName DocumentRoot /www/docs/ ServerName DirectoryIndex index.htm
Perl CGI Test # yum install perl # vi /var/www/cgi-bin/echo.pl #!/usr/bin/perl use strict; use warnings; print qq(Content-type: text/plain\n\n); print ”Hello CGI\n";
Question & Answer
LAB 03 Install Apache Web Server with PHP Programming Hello World CGI Create Virtual Web Hosting And index.html ◦ ◦