Tutorial Shengdong Zhao (some slides are reused/modified from Neil Ernst’s apache tutorial)

Slides:



Advertisements
Similar presentations
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
Advertisements

20-753: Fundamentals of Web Programming 1 Lecture 11: Web Server Case Study Fundamentals of Web Programming Lecture 11: Web Server Case Study.
Chapter Apache Installation on Linux. Acknowledgement The contribution made by Darrin Morison is acknowledged.
Apache Installation by Jack Davis. Web Servers The Apache HTTP Server is the most widely used web server on the Internet. Apache is fast, free, and full-featured.
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.
How the web works: HTTP and CGI explained
CSE 190: Internet Commerce Lecture 4: Web Servers.
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.
CS 142 Lecture Notes: HTTPSlide 1 HTTP Request GET /index.html HTTP/1.1 Host: User-Agent: Mozilla/5.0 Accept: text/html, */* Accept-Language:
APACHE SERVER By Innovationframes.com »
Linux Operations and Administration
ECE Prof. John A. Copeland Office: Klaus or call.
Web Server Configuration Alokes Chattopadhyay Computer & Informatics Centre IIT Kharagpur.
Basics of the HTTP Protocol and Apache Web Server Brandon Checketts.
Web technologies and programming cse hypermedia and multimedia technology Fanis Tsandilas April 3, 2007.
Web Hacking 1. Overview Why web HTTP Protocol HTTP Attacks 2.
HTTP Caching & Cache-Busting for Content Publishers Michael J. Radwin O’Reilly Open Source Convention July 28, 2004.
SUNY Polytechnic Institute CS 490 – Web Design, AJAX, jQuery Web Services A web service is a software system that supports interaction (requesting data,
HTTP Protocol Specification
HTTP HTML Introduction to web development. elaborate SPARCS 07 Wheel Moodle TA 안병욱 CS101 TA The presenter is 바퀴짱 ? 3 월 신작 ? 밤의 제왕 ? 악명 높은 TA?
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.
Apache httpd Web Server C. Edward Chow. Advanced Internet & Web Systems chow2 Outline of the Talk Introduction to Apache httpd web server Basic Compilation,
CSC 2720 Building Web Applications Getting and Setting HTTP Headers (With PHP Examples)
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.
Application Layer 2 Figures from Kurose and Ross
Maryam Elahi University of Calgary – CPSC 441.  HTTP stands for Hypertext Transfer Protocol.  Used to deliver virtually all files and other data (collectively.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
WWW, HTTP, GET, POST, Cookies Svetlin Nakov Telerik Corporation
IT Engineering Instructor: Rezvan Shiravi
Web Services CSCI N321 – System and Network Administration Copyright © 2007,2008 by Scott Orr and the Trustees of Indiana University.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 6.
1 Apache. 2 Module - Apache ♦ Overview This module focuses on configuring and customizing Apache web server. Apache is a commonly used Hypertext Transfer.
Apache Web Server v. 2.2 Reference Manual Chapter 1 Compiling and Installing.
Copyright 2012 & 2015 – Noah Mendelsohn Introduction to: The Architecture of the World Wide Web Noah Mendelsohn Tufts University
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG 11 Kigali, Rwanda May 2010 Dorcas Muthoni Courtesy: Hervey Allen.
1 Week 6 The lynx browser Apache Web Server John Wang With materials courtesy of Inge Mclaurin.
1 Introductory material. This module illustrates the interactions of the protocols of the TCP/IP protocol suite with the help of an example. The example.
Proxy Lab Recitation I Monday Nov 20, 2006.
Web Server Design Week 8 Old Dominion University Department of Computer Science CS 495/595 Spring 2010 Martin Klein 3/3/10.
1 CS 4396 Computer Networks Lab TCP/IP Networking An Example.
HTTP1 Hypertext Transfer Protocol (HTTP) After this lecture, you should be able to:  Know how Web Browsers and Web Servers communicate via HTTP Protocol.
A Little Bit About Cookies Fort Collins, CO Copyright © XTR Systems, LLC A Little Bit About Cookies Instructor: Joseph DiVerdi, Ph.D., M.B.A.
1 Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess AFNOG X Cairo, Egypt May 2009 Hervey Allen.
What's Apache? Apache is open source, powerful, free and runs on more than half of all Internet servers. Let's take a quick look at how to get your Apache.
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.
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.
HTTP How the Internet servers and clients communicate.
Web Technologies Lecture 1 The Internet and HTTP.
JavaScript, Part 4 Instructor: Charles Moen CSCI/CINF 4230.
HTTP Here, we examine the hypertext transfer protocol (http) – originally introduced around 1990 but not standardized until 1997 (version 1.0) – protocol.
HTTP and Fiddler Dandan Shi Technical Advisor. Conditions and Terms of Use Microsoft Confidential This training package is proprietary and confidential,
Overview of Servlets and JSP
Presented by Lonnye Bower Fardin Khan Chris Orona APACHE WEB SERVER.
LURP Details. LURP Lab Details  1.Given a GET … call a proxy CGI script in the same way you would for a normal CGI request  2.This UDP perl.
COMP2322 Lab 2 HTTP Steven Lee Jan. 29, HTTP Hypertext Transfer Protocol Web’s application layer protocol Client/server model – Client (browser):
Planning, configuring, running and maintaining a web server -1.
Web Caching. Why Caching? Faster browsing experience for users Cache hit rate Traffic Prioritization Reduce network bandwidth requirements significantly.
© Janice Regan, CMPT 128, Jan 2007 CMPT 371 Data Communications and Networking HTTP 0.
Fiddler and Your Website Robert Boedigheimer. About Me Web developer since 1995 Columnist for aspalliance.com Pluralsight Author 3 rd Degree Black Belt,
Web Server Administration Chapter 6 Configuring a Web Server.
Apache and... Virtual Hosts ---- aliases mod_rewrite ---- htaccess
The Hypertext Transfer Protocol
CISC103 Web Development Basics: Web site:
Authentication & .htaccess
Introduction to Programming the WWW I
CISC103 Web Development Basics: Web site:
CS320 Web and Internet Programming Cookies and Session Tracking
HTTP Request Method URL Protocol Version GET /index.html HTTP/1.1
APACHE WEB SERVER.
CSCI-351 Data communication and Networks
Presentation transcript:

Tutorial Shengdong Zhao (some slides are reused/modified from Neil Ernst’s apache tutorial)

History Based on Rob McCool’s NCSA web server (left to start Netscape 1994) 1 st release (Apache 0.7.x) on April 1995 based on NSCA 1.3 server Patches created for extensions and bug-fixes (Apache = A-patchy Server) Today – 52.65% of all web server (July 07, streams: 1.3.x (very popular) & 2.x (current)

Apache Architecture

Apache Architecture Select module handler at install Modules hook into phases in the Core processing cycle via API Apache talks to clients use HTTP protocol –Client request: GET /index.html –Apache maps request to a handler or file –Authenticate –Return content with headers –Modules can hook in at any point during the protocol

Headers Check out the LiveHTTPHeaders extension for Firefox: view the entire transaction. Headers usually tell the client the status of the request, the mime-type of the content returned, the length, etc. –Allows the client to decide what to do.

GET / HTTP/1.1 Host: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: ) Gecko/ Firefox/ Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/ png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO ,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: … HTTP/1.x 200 OK Date: Tue, 10 Jul :47:16 GMT P3P: policyref=" CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE GOV" Cache-Control: private Vary: User-Agent Set-Cookie: FPCM=deleted; expires=Mon, 10 Jul :47:15 GMT; path=/ Set-Cookie: … Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=utf-8 Content-Encoding: gzip

Modules The power of Apache is its modules –mod_ssl: Secure internet transactions –mod_rewrite: redirect agents elsewhere –mod_perl: PERL language interface –mod_log_config: logging –mod_include: filter other modules

Apache on CDF We run instances of the Apache server daemon (httpd) using our own config files (no install!) – version – course web page student guide Apache and follow the instructions 2 – download the tar file apache.tar.gz 3 – save it and untar it to a suitable folder, e.g. ~/309/ (tar –xvzf apache.tar.gz) 4 – cd ~/309/apache/bin;./start.sh This starts the server; stop it using./stop.sh 5 – verify: ps –u | grep httpd 6 – view: lynx /

Directory Structure Bin: the start and stop programs Conf: the config file for your server instances Cgi-bin: put executable scripts here Logs: error_log is any errors the server gets (404, 403), and access_log all accesses the server deals with htdocs: html files E.g. – see examples in each directory and play around

Configure Apache Shouldn’t need to change much in the /conf directory (mainly httpd.309.conf) Can set your DocumentRoot in httpd.conf: –DocumentRoot /where/you/want/to/put/your/docs Can set your web admin s –ServerAdmin

Demo

Work at home 1. Install and config Cygwin 2. Double click Cygwin icon to start 3. Type “startx” to start x window 4. At the popup xterm, type “ssh -X to login to your account

FAQs Can I run this all at home, on Windows/Mac? –Sure. Apache even runs on Xbox. However, we mark assignments on CDF How do I view my server on the internet? – – in the labs My start/stop aren’t working? –Always start/stop directly in apache/bin to make sure paths work properly

Other references The student guide on the course site httpd.apache.org (e.g.) – – chttp://httpd.apache.org/docs/1.3/howto/auth.html#basi c Refcards.com – Apache 1.3 reference card for printing (also other useful cards) refcard-a4.pdf refcard-a4.pdf

.htaccess files Use.htaccess files –These are read per-directory (affect subs) by the server and can contain many things Security restrictions Redirects URL rewrites

.htaccess files: sample format order allow, deny deny from deny from Allow from all AuthUserFile / user/local/you/safedir/.htpasswd AuthGroupFile /dev/null AuthName EnterPassword AuthType Basic Require user wsabstract