15. Table 4.1. Example CGI environment variables Web Protocols and Practice WEB SERVERS 10.9.57.188 users.berkeley.edu REMOTE_ADDR REMOTE_HOST Client www.bar.com Apache/10206 HTTP/1.0 80 /www CGI/2.0 SERVER_NAME SERVER_SOFTWARE SERVER_PROTOCOL SERVER_PORT DOCUMENT_ROOT GATEWAY_INTERFACE Server Text/html 158 GET NAME=Noam+Chomsky De-CH Mozilla/2.0 CONTENT_TYPE CONTENT_LENGTH REQUEST_METHOD QUERY_STRING ACCEPT_LANGUAGE HTTP_USER_AGENT Request Example Variable Type
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26. Web Protocols and Practice www.foo.com www.bar.com www.big.com www.big.com www.mid.com Surrogate 1 2 3 4 To/From Internet Figure 4.1. Hosting complex with surrogate in front of four server machines WEB CLIENTS
27.
28. Table 4.2 Key configuration directives for child processes and network connection Web Protocols and Practice WEB CLIENTS Initial number of child processes (5) Maximum number of child processes (256) Target Minimum number of idle children (5) Target Maximum number of idle children (10) Maximum number of requests per child (30) Maximum number of pending connections (511) Size of the TCP send buffer (OS default) Max number of requests per connection (100) Maximum idle time for connection (15 sec) StartServers MaxClients MinSpareServers MaxSpareServers MaxRequestsPerChild ListenBacklog SendBufferSize MaxKeepAliveRequests KeepAliveTimeout Definition (default value in Apache 1.3.3) Directive
29.
30. Table 4.3 Built-in handlers in Apache server and default file extension Web Protocols and Practice WEB CLIENTS Send the file as static content Send the file as an HTTP response message (.asis) Invoke the file as a CGI script (.cgi) Treat the file as a server-side include (.shtml) Treat the file as an imagemap rule file (.imap) Treat the file as a map for content negotiation (.var) Get the server’s configuration information Get the server’s status report Default-handler Send-as-is Cgi-script Server-parsed Imap-file Type-map Server-info Server-status Purpose (file extension) Handler