Page 49 - Open Soource Technologies 304.indd
P. 49
Open Source Technologies
Notes 6. MaxRequestsPerChild 0
7. </IfModule>
8. }
9. <IfModule worker.c>
10. StartServers 3
11. MaxClients 8
12. MinSpareThreads 5
13. MaxSpareThreads 10
14. ThreadsPerChild 25
15. MaxRequestsPerChild 0
16. </IfModule>
4.2.4 ServerRoot
The ServerRoot directive takes a single argument: a directory path pointing to the directory
where the server lives. All relative path references in other directives are relative to the value
of ServerRoot. If you compiled Apache from source on Linux/Unix, as described earlier in this
hour, the default value of ServerRoot is/usr/local/apache2. If you used the Windows installer,
the ServerRoot is c:\Program Files\Apache Group.
4.2.5 Per Directory Configuration Files
Apache uses perdirectory configuration files to allow directives to exist outside the main
configuration filehttpd.conf. These special files can be placed in the file system. Apache will
process the content of these files if a document is requested in a directory containing one of these
files or any subdirectories under it. The contents of all the applicable perdirectory configuration
files are merged and processed. For example, if Apache receives a request for the/usr/local/
apache2/htdocs/index.html file, it will look for per-directory configuration files in the/,/usr,/
usr/local,/usr/local/apache2, and /usr/local/apache2/htdocsdirectories, in that order.
Enabling perdirectory configuration files has a performance penalty. Apache must perform
expensive disk operations looking for these files in every request, even if the files do not exist.
Perdirectory configuration files are called .htaccess by default. This is for historical reasons; they
were originally used to protect access to directories containing HTML files.
The directive AccessFileName enables you to change the name of the perdirectory configuration
files from.htaccess to something else. It accepts a list of filenames that Apache will use when
looking for perdirectory configuration files.
To determine whether a directive can be overridden in the perdirectory configuration file, check
whether the Context: field of the directive syntax definition contains. htaccess.
Apache directives belong to different groups, specified in the Override: field in the directive
syntax description. Possible values are:
• AuthConfig? Authorization directives.
44 LOVELY PROFESSIONAL UNIVERSITY