{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


Practical Guide to Fedora and Red Hat Enterprise Linux, A (4th Edition)

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 Answers to Even-numbered Exercises 1. How 2. How would you instruct an Apache server to listen on port 81 instead of port 80? In httpd.conf , change the directive Listen 80 to Listen 81 3. Ho the Web? 4. Apache must be started as root . Why? Why does this action not present a security risk? By default, Apache listens on port 80, which is a privileged port. Only root can use privileged ports, so you must start Apache as root . Starting Apache as root does not pose a security risk because Apache releases root privileges as soon as it has started using the port. 5. If etwork? 6. Why is it more efficient to run scripts using mod_php or mod_perl than through CGI? Running a CGI script requires a system call to fork () and exec () to create a new process. Once the process has finished (which, in the case of CGI scripts, is usually very shortly after it has started), it terminates. A script run from a module does not have this overhead because it runs inside the Apache server process. 7. What twosigned?
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 8. Some Web sites generate content by retrieving data from a database and inserting it into a template using PHP or CGI each time the site is accessed. Why is this practice often a poor idea? In many cases, the same data is generated each time a given page is accessed, unnecessarily using CPU and disk resources for each access. 26 2 Using resources unnecessarily can result in pages being unavailable when the system load is high. 9. Asation. 10. Part of a Web site is a private intranet and is accessed as http://exam-ple.com/intranet. Describe how you would prevent people outside the company from accessing this site. Assume the company uses the subnet internally. a. Insert the following lines in httpd.conf : <Directory /var/www/html/corp> Order deny,allow Deny from all Allow from 192.168. </Directory> b. Create the following .htaccess file in the intranet directory: Order deny,allow Deny from all Allow from 192.168....
View Full Document

{[ snackBarMessage ]}