SLIDE 10 Prof. Dr. Dr. h.c. mult. Ge rhard Krüger, Albrecht Schmidt: Web Engineering, WS00/01 page37
Configuration of Web Servers II
local vs. remote (e.g. using HTTP) GUI vs. config-file
- GUI is in general easier to use
- config-files allow to keep old configurations (test new configurations,
go back to old configuration, check for differences)
- combining GUI and config-file is a preferable solution (using a GUI for
the user that manipulates a config-file)
- config-file with statements that are executed/replaced (e.g. mod_perl
in the Apache Server allows to uses arbitrary PERL commands in the config file, to uses the same file on different servers)
access rights, security files, media type – content type executable programs
granularity for configuration
- file, directory, virtual host, server
integration with the operating system
Prof. Dr. Dr. h.c. mult. Ge rhard Krüger, Albrecht Schmidt: Web Engineering, WS00/01 page38
Information in a Web Server
what information is available? (e.g. Apache)
sent, excluding HTTP headers.
- %...f: Filename
- %...{FOOBAR}e: The
contents
the environment variable FOOBAR– see CGI Programming
- %...h: Remote host
- %...{Foobar}i:The
contents
header line(s) in the request sent to the server.
- %...l: Remote logname (fromidentd,
if supplied)
The contents
note "Foobar" from another module.
contents
header line(s) in the reply.
port the request was served to
The process ID
the child that serviced the request.
First line
request
Status. For requests that got internally redirected, this is status
the *original* request ---
- %...>s for the last. %...t: Time, in common log format time format
- %...{format}t: The time, in the form given by format, which should
be in strftime(3) format.
time taken to serve the request, in seconds.
user (from auth; may be bogus if return status (%s) is 4 01) %...U: The URL path requested.
The name
the server (i.e. which virtual host?)
examples
Hostname First-line-of-request Status Bytes-sent
- %!200,304,302{Referer}i ...
If the State is 200, 302
304 than log the Referer
http://www.apache.org/docs-1.2/mod/mod_log_config.html
Prof. Dr. Dr. h.c. mult. Ge rhard Krüger, Albrecht Schmidt: Web Engineering, WS00/01 page39
Logfiles of Web Servers
log access common logfile format extended logfile format custom logfile multiple logfiles log errors and warnings error logfile for maintenance and monitoring cookielogfile to analyze user behavior
Prof. Dr. Dr. h.c. mult. Ge rhard Krüger, Albrecht Schmidt: Web Engineering, WS00/01 page40
Error Messages I
categories of errors (see HTTP) most often : 404 (file not found) 4xx – error on client side 5xx – error on server side specific errors, e.g. 401.X with Microsoft IIS errors should be intercepted define useful reaction make specific pages for errors e.g. 404 – file not found
possible reasons: file does not exist (anymore), typos, ... some possible solutions
a) show am error page – tell the user that the page is not available :-( b) show the main page of the server c) show a search page on the server, tell the user to search d) try to find with the filename and the path the page or a related page in the internal search engine and show this page :-)