12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

334CHAPTER 15Creating a Web Server with the Apache HTTP ServerSymLinksIfOwnerMatchOnly follow symbolic links if the target file or directory is owned by thesame user as the file or directory requested.Directory SectionsIn the main server section, each directory that contains files accessible to remote systemsfrom the Apache HTTP server can be configured separately as shown in the sections in Listing 15.2. sections can also be configured within a virtual hostsection.CAUTIONDo not end the directory name with a trailing forward slash.LISTING 15.2Example Section# Defaults for all directoriesOptions FollowSymLinks# Settings for DocumentRootOptions Indexes MultiViews# Settings for /legal/DirectoryIndex index.htmlErrorDocument 404 /errors/legal/404.htmlAs you can see from Listing 15.2, it is wise to set defaults for the root directory of the filesaccessible by Apache and then modify them per directory and subdirectory. Directivesconfigured for a directory apply to that directory and any subdirectories unless a separateset of directives is provided for the subdirectory. If a directive is defined in the mainserver section as well as within a directory declaration, the value in the directory declarationis used for that particular directory.Virtual Host SectionsTo serve more than one website from the same Apache HTTP server, you need to configurevirtual hosts. There are two types of virtual hosts: name-based and IP-based. Namebasedvirtual host means that multiple names are running on each IP address. IP-based

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!