|
|
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
What a webserver does and how it does it
- client/server
- ports, pid, and sockets
- simplest possible request
- flesh it out
- method
- protocol and version
- URL
DNS
multiple sockets
mime types and viewers
Admin basics
- installing on linux or other free unix-like OS
- Root: Tell the package manager to install that package
- eyeball the configuration to see defaults
- installing on a non-free unix
- download (preferred)
- unzip the zipfile
- untar the tarball
- read the README file[s]
- root: run
configure script[s]
make [make test, make install]
If things go wrong with the compilation you will fall back on your unixy and ANSI C programming skills.
- eyeball the configuration to see defaults, and files/dirs you need to create
- starting the daemon process
- package managers automagically start and change your startup scripts
- root:
/path/to/httpd or apachectl start
- troubleshoot: almost certainly missing dirs and logfiles
- see if it's visible from your machine
- see if it's visible from a remote machine
- 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
user [username] UID of webserver! Usually something specific: nobody, www-data, apache. httpd started as root but runs with a different effective ID.
group [groupname] GID of webserver! More security next session
group [groupname] GID of webserver!
servername [www.myserver.com] "www" is arbitrary; remember it's done in dns.
DocumentRoot [/path/to/docRoot] the main directory where the "homepage" is served from
TransferLog [/path/to/log] logs requests
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.
|
|