Apache server lab

posted in: Research Paper | 0

EXERCISE 1

1.Add the necessary directives to your Apache config file so that you can monitor the server from a browser. What values do you have for “Server Version” and “Server Build”?

  • 2.Try monitoring your server using the status monitor URL with and without the refresh option.
  • 3.Open a second browser window and try retrieving the “large_text.txt” file that we used in Project I. What values do you see for Req and Conn in the extended status display of the first browser window? What do these values represent?4.Use the SetHandler directive to display server information. What do you see in the Server Module List?

EXERCISE 2

1.How would you define the LogFormat and CustomLog directives to create a custom log format and log the following information in each request?

  • 2.The name of the remote host.
  • 3. The time it takes to service the request.
  • 4.The time that the request was received.
  • 5.The number of bytes sent
  • 6.Place these directives in your config file and request the file “large_text.txt” used in Project I. What is recorded in your access log file?

EXERCISE 3

  1. What conditional directives would you use to log the host, browser type, and request to an access log file when an HTTP request returns a 404 error?
  • 2. Use these conditional directives to create a custom log format and try accessing file ‘ex7_3.html’ (which doesn’t exist) from your browser. What is your custom log format? What do you see in your access log?
  • 3. Use the ‘SetEnvIf’ directive so that the request is not logged if the file name ‘ex7_3’ is specified in the URL. What did you use for your ‘SetEnvIf’ directive and ‘CustomLog’ directive? Try again to request file ‘ex7_3.html’. Is anything recorded in your access log? Now try using the file name ‘ex7_4.html’ (which again doesn’t exist). Is anything recorded this time?

Last Updated on