squeak!
Syllabus Homepage
Course Overview
Course resources
Day 1
Day 2
Day 3
Day 4
Common errors
Internet Glossary
About Your Instructor
Credits: This site powered by the vi text editor, apache webserver, perl scripting, and Debian linux.
squeak!

Apache Web Server Admin - Day 1

Admin

Texas state survey and Roll.

Goals

In this session you will:
  • learn the important resources
  • learn the nature of the major webserver players
  • review how a webserver works
  • learn bare basics: compiling, installing, start/stop/restarting
  • learn the critical configuration items

Resources

See
resources page.

The Major Players

  • CERN - early, public-domain webserver
  • NCSA - which provided the base code for apache and other servers
  • APACHE - most common webserver on the net. Subject of this course.
  • Netscape - NCSA-based proprietary server. Previously the major commercial server.
  • IIS - MS default server
  • Specialty servers
    • boa
    • phttpd

What a webserver does and how it does it

  • client/server
  • ports, pid, and sockets
  • simplest possible request
  • flesh it out
    1. method
    2. protocol and version
    3. URL
  • DNS
  • multiple sockets
  • mime types and viewers

    Admin basics

    • installing on linux or other free unix-like OS
      1. Root: Tell the package manager to install that package
      2. eyeball the configuration to see defaults
    • installing on a non-free unix
      1. download (preferred)
      2. unzip the zipfile
      3. untar the tarball
      4. read the README file[s]
      5. root: run configure script[s]
      6. make [make test, make install]
        If things go wrong with the compilation you will fall back on your unixy and ANSI C programming skills.
      7. eyeball the configuration to see defaults, and files/dirs you need to create
    • starting the daemon process
      1. package managers automagically start and change your startup scripts
      2. root: /path/to/httpd or apachectl start
      3. troubleshoot: almost certainly missing dirs and logfiles
      4. see if it's visible from your machine
      5. see if it's visible from a remote machine
      6. set up startup scripts
    • stopping the daemon
      root: kill `cat /var/run/httpd.pid` or apachectl stop
    • restarting the daemon
      root: kill -HUP `cat /var/run/httpd.pid` or apachectl restart

    Critical configuration items

    1. user [username] UID of webserver! Usually something specific: nobody, www-data, apache. httpd started as root but runs with a different effective ID.
    2. group [groupname] GID of webserver! More security next session
    3. group [groupname] GID of webserver!
    4. servername [www.myserver.com] "www" is arbitrary; remember it's done in dns.
    5. DocumentRoot [/path/to/docRoot] the main directory where the "homepage" is served from
    6. TransferLog [/path/to/log] logs requests
    7. ErrorLog [/path/to/log] logs errors

    Homework

    • virtual hosting 49-50, 58-64
    • user websites 160-161
    • setting up options with the config and .htaccess 68-70, 126-131
    • modules
    • CGI 75-90
    • SSI 179-185
    • mime handlers, actions 100-103
    • authentication 104-117
    • security 205


    http://www.mousetrap.net/syllabus/apache/day1.html
    $Id: day1.orb,v 1.2 2001/11/26 03:01:03 mouse Exp $

    Remember, your login is based on your machine's hostname, not on any other number.
    ~/[initials] refers to the subdirectory under your homedir, named after your initials. Everything except for .dotfiles will be stored in your ~/[initials] directory.


  • © 1995-2001 jason carr
    Distributed under the terms of the GNU Free Documentation License.