Problem

In this hands-on project, you configure the Apache Web server and test daemon permission...

In this hands-on project, you configure the Apache Web server and test daemon permissions to files on the system.

1. Switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of secret.

2. At the command prompt, type grep DocumentRoot/etc/httpd/conf/httpd.conf and press Enter. What is the document root directory?

3. At the command prompt, type grep DirectoryIndex /etc/httpd/conf/httpd.conf and press Enter. What file(s) will automatically be handed out by the Apache daemon from the document root directory?

4. At the command prompt, type grep "User" /etc/httpd/conf/httpd.conf and press Enter. What user does the Apache daemon run as locally?

5. At the command prompt, type grep "Group" /etc/httpd/conf/httpd.conf and press Enter. What user does the Apache daemon run as locally?

6. At the command prompt, type apachectl configtest and press Enter. Are there any syntax errors within your /etc/httpd/conf/httpd.conf file?

7. Edit the /var/www/html/index.html file with a text editor such as vi. Are there any entries? Add the following lines:

My sample website

When finished, save your changes and quit the editor.

8. At the command prompt, type service httpd start and press Enter to start Apache.

9. At the command prompt, type chkconfig --level 5 httpd on and press Enter to ensure that Apache is started when the system enters runlevel 5.

10. At the command prompt, type curl http://server1.class.com/ and press Enter. Was your Web page successfully returned by Apache?

11. At the command prompt, type ab –n 1000 http://server1.class.com/ and press Enter. How long did Apache take to respond to 1,000 requests?

12. At the command prompt, type less /etc/httpd/logs/access_log and press Enter. How many Web page hits are shown? Explain.

13. Switch to the gdm by pressing Ctrl+Alt+F2 or Ctrl+Alt+F7 and log in to the GNOME Desktop Environment as sample user one using the password of secret.

14. Open the Firefox Web browser. Enter http://server1.class.com as the location. Is your Web page displayed?

15. Switch back to your command-line terminal (tty2) by pressing Ctrl+Alt+F2.

16. At the command prompt, type ls –l/var/www/html/index.html and press Enter. Who owns the file? What is the group owner? What category do the Apache daemons use when they run as the user apache and group apache?

17. At the command prompt, type chmod 640 /var/www/html/index.html and press Enter.

18. Switch to the graphical terminal by pressing Ctrl+Alt+F1 or Ctrl+Alt+F7 and refresh the Web page in your Firefox Web browser. What error message do you receive?

19. Switch back to your command-line terminal (tty2) by pressing Ctrl+Alt+F2.

20. At the command prompt, type chmod 644 /var/www/html/index.html and press Enter.

21. Switch to the graphical terminal by pressing Ctrl+Alt+F1 or Ctrl+Alt+F7 and refresh the Web page in your Firefox Web browser. Was the Apache daemon able to read the index.html file? Log out of the GNOME Desktop Environment.

22. Switch back to your command-line terminal (tty2) by pressing Ctrl+Alt+F2.

23. Type exit and press Enter to log out of your shell.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 13