
2.
A hat named by the entire URI path.
3.
A default server hat as specified by the
ImmDefaultHatName
keyword.
4.
DEFAULT_URI
(and if none of those exist, it goes back to the “parent” Apache
hat).
5.2.2 Location and Directory Directives
Location and directory directives specify hat names in the program configuration file
so the program calls the hat regarding its security. For Apache, you can find documen-
tation about the location and directory directives at
http://httpd.apache.org/
docs-2.0/sections.html
.
The location directive example below specifies that, for a given location,
mod_change_hat
should use a specific hat:
<Location /foo/>
ImmHatName MY_HAT_NAME
</Location>
This tries to use
MY_HAT_NAME
for any URI beginning with
/foo/
(
/foo/
,
/foo/
bar
,
/foo/cgi/path/blah_blah/blah
, etc.).
The directory directive works similarly to the location directive, except it refers to a
pathname in the file system, in the following example:
<Directory "/srv/www/www.immunix.com/docs"> # Note lack of trailing slash
ImmHatName immunix.com
</Directory>
Example:
The program phpsysinfo is used to illustrate a location directive in the
following example. The tarball can be downloaded from
http://phpsysinfo
.sourceforge.com
.
1
After downloading the tarball, install it into
/srv/www/htdocs/sysinfo/
.
2
Create
/etc/apache2/conf.d/sysinfo.conf
and add the following
text to it:
114
Содержание APPARMOR 1.2
Страница 1: ...Novell AppArmor Powered by Immunix Administration Guide www novell com 1 2 09 29 2005...
Страница 4: ......
Страница 14: ......
Страница 116: ......
Страница 128: ......