LinuxChix Apache. Serving Webpages The layer 7 protocol (HTTP) is what our browsers talk to get us the websites we can't seem to live without. HTTP is.

Slides:



Advertisements
Similar presentations
HTTP HyperText Transfer Protocol. HTTP Uses TCP as its underlying transport protocol Uses port 80 Stateless protocol (i.e. HTTP Server maintains no information.
Advertisements

HyperText Transfer Protocol (HTTP)
How does the server format the information it gives to the appln program? As environment variables and in standard input.
IST 535 Week 1 Class Orientation / Review of Web Basics.
16-Jun-15 HTTP Hypertext Transfer Protocol. 2 HTTP messages HTTP is the language that web clients and web servers use to talk to each other HTTP is largely.
HTTP Hypertext Transfer Protocol. HTTP messages HTTP is the language that web clients and web servers use to talk to each other –HTTP is largely “under.
Chapter Apache Installation in Linux- Mandrake. Acknowledgment The following information has been obtained directly from
CSE 190: Internet Commerce Lecture 4: Web Servers.
HTTP Exercise 01. Three Internet Protocols IP TCP HTTP Routes messages thru “Inter-network “ 2-way Connection between programs on 2 computers So they.
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley, July.
Configuring a Web Server. Overview  Understand how a Web server works  Install IIS (Internet Information Services) and Apache Web servers  Examine.
CP476 Internet Computing Browser and Web Server 1 Web Browsers A client software program that allows you to access and view Web pages on the Internet –Examples.
1 K. Salah Module 2.1: Application Layer Application-level protocols provide high-level services –Web and HTTP –DNS –Electronic mail –Remote login –FTP.
2/9/2004 Web and HTTP February 9, /9/2004 Assignments Due – Reading and Warmup Work on Message of the Day.
Hypertext Transport Protocol CS Dick Steflik.
Web Client/Server Communication A290/A590, Fall /09/2014.
APACHE SERVER By Innovationframes.com »
Linux Operations and Administration
Web Server Configuration Alokes Chattopadhyay Computer & Informatics Centre IIT Kharagpur.
The Linux Operating System Lecture 5: Apache Tonga Institute of Higher Education.
Web Servers Web server software is a product that works with the operating system The server computer can run more than one software product such as .
Web Server Design Week 5 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/10/10.
An introduction to Apache. Different Types of Web Servers Apache is the default web server for may Unix servers. IIS is Microsoft’s default web server.
FTP (File Transfer Protocol) & Telnet
CP476 Internet Computing Lecture 5 : HTTP, WWW and URL 1 Lecture 5. WWW, HTTP and URL Objective: to review the concepts of WWW to understand how HTTP works.
TCP/IP Protocol Suite 1 Chapter 22 Upon completion you will be able to: World Wide Web: HTTP Understand the components of a browser and a server Understand.
2: Application Layer1 CS 4244: Internet Software Development Dr. Eli Tilevich.
Rensselaer Polytechnic Institute Shivkumar Kalvanaraman, Biplab Sikdar 1 The Web: the http protocol http: hypertext transfer protocol Web’s application.
20-1 Last time □ NAT □ Application layer ♦ Intro ♦ Web / HTTP.
Week 11: Application Layer1 Web and HTTP First some jargon r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,…
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Apache + Tomcat. Apache + Tomcat Download mod_webapp.so:
Web Services CSCI N321 – System and Network Administration Copyright © 2007,2008 by Scott Orr and the Trustees of Indiana University.
1 Apache and Virtual Sites and SSL Dorcas Muthoni.
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG 11 Kigali, Rwanda May 2010 Dorcas Muthoni Courtesy: Hervey Allen.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
1 HTTP EECS 325/425, Fall 2005 September Chapter 2: Application layer r 2.1 Principles of network applications m app architectures m app requirements.
Web Server Design Week 8 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 3/3/10.
Web Server Design Week 4 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/03/10.
CIS679: Lecture 13 r Review of Last Lecture r More on HTTP.
1-1 HTTP request message GET /somedir/page.html HTTP/1.1 Host: User-agent: Mozilla/4.0 Connection: close Accept-language:fr request.
2: Application Layer1 Chapter 2 Application Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross.
WWW: an Internet application Bill Chu. © Bei-Tseng Chu Aug 2000 WWW Web and HTTP WWW web is an interconnected information servers each server maintains.
Appendix E: Overview of HTTP ©SoftMoore ConsultingSlide 1.
Operating Systems Lesson 12. HTTP vs HTML HTML: hypertext markup language ◦ Definitions of tags that are added to Web documents to control their appearance.
2: Application Layer 1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
Web Server Design Week 7 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/24/10.
Web Technologies Lecture 1 The Internet and HTTP.
Web Server Administration Chapter 6 Configuring a Web Server.
FTP COMMANDS OBJECTIVES. General overview. Introduction to FTP server. Types of FTP users. FTP commands examples. FTP commands in action (example of use).
Overview of Servlets and JSP
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
Web Server Design Week 6 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 2/17/10.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
Week 11: Application Layer 1 Web and HTTP r Web page consists of objects r Object can be HTML file, JPEG image, Java applet, audio file,… r Web page consists.
CITA 310 Section 4 Apache Configuration (Selected Topics from Textbook Chapter 6)
Web Server Design Week 5 Old Dominion University Department of Computer Science CS 495/595 Spring 2012 Michael L. Nelson 02/07/12.
Web Server Administration Chapter 6 Configuring a Web Server.
Python: Programming the Google Search (Crawling) Damian Gordon.
Web Server Design Week 6 Old Dominion University Department of Computer Science CS 495/595 Spring 2006 Michael L. Nelson 2/13/06.
What’s Really Happening
Web and Proxy Server.
HTTP – An overview.
Computing with C# and the .NET Framework
Unix System Administration
Hypertext Transfer Protocol
The HTTP Protocol COSC 2206 Internet Tools The HTTP Protocol
HTTP Hypertext Transfer Protocol
Presentation transcript:

LinuxChix Apache

Serving Webpages The layer 7 protocol (HTTP) is what our browsers talk to get us the websites we can't seem to live without. HTTP is written as a server/client protocol; the client is called the browser, the server is called the web server. Different servers exist: we shall use Apache – but lighthttpd, zope, etc are examples for UNIX, IIS is an example one for windows.

Apache: an intro ● Written as a patch to the original NSCA httpd webserver. ● Evolved into a huge project and the “patch” is now huger than the orginal code. ● Now runs on Windows NT environments as well as UNIX. ● Netcraft surveys show that Apache is the most common (announced) web server.. see

Installing Apache ● We shall do this from ports. Two different branches are being maintained: 1.3 and 2.x. 1.3 is deprecated so we shall use 2.x ● FreeBSD ports maintain different versions so that people can migrate their applications when they are ready. # cd /usr/ports/www/apache22 # make all install clean ● Edit /etc/rc.conf to turn apache on. apache_enable=“YES”

httpd.conf ● This is the file which tells apache how to behave. It has the general format of directives and their values separated by spaces. ● Lines beginning with '#' are ignored so are blank lines. ● Directives can be made more specific to files, directories, conditionals, etc using sections which have a format similar to html tags viz: SpecificDirective thevalue ● The configuration syntax is well documented in the file as well as

Sections & Directives of interest ● ServerRoot: This is the directory your server's system lives in; also configuration details which don't specify a full path will be relative to this path. ● DocumentRoot: When someone requests for a webpage, the server needs to know how to map that to a folder in the filesystem. This directive tells it where to start. ● ServerName: set this to the dns name of the server ● ServerAdmin: address of the webmaster ● ErrorLog and CustomLog: paths to log files. Very usefull for debugging problems with apache setup etc

Sections & Directives ctd: ● DirectoryIndex: tells apache which file/object to serve by default when a client requests for a website if none is specified. Usual setting is index.html but can be anything. Multiple files are separated by spaces and tried in order (left to right) e.g DirectoryIndex index.html index.html home.htm

Common Pitfalls with configuring apache ● Spelling errors (use apachectl configtest after making changes) ● Wrong hostname (set in /etc/rc.conf) ● Improper file permissions (See the ErrorLog and CustomLog) ● With that in mind, modify the ServerName and ServerAdmin variables, and start apache using: # /usr/local/etc/rc.d/apache22.sh start ● From the command line do $ lynx localhost If all is well, you should be able to see an “It works” page

UnderThe Hood: Brief http protocol discussion ● HTTP messages consist of: – Headers – Blank line – Body ● When a client requests for a web object (page/image/...) the server sends a response. Both have the same format shown above; difference is the allowed contents of the Headers and the Body. ● As soon as the response is sent, the webserver closes the connection. As such, HTTP is said to be “stateless”.

Sample session $ telnet inst.ws.linuxchix.or.ke 80 GET / HTTP/1.1 Host: inst.ws.linuxchix.or.ke HTTP/ OK Date: Thu, 15 Mar :33:05 GMT Server: Apache/2.2.0 (FreeBSD) mod_ssl/2.2.0 OpenSSL/0.9.7e-p1 DAV/2 Last-Modified: Sat, 20 Nov :16:24 GMT ETag: "41286b-2c-4c23b600" Accept-Ranges: bytes Content-Length: 44 Content-Type: text/html It works! Connection closed by foreign host.