13.06.2015 Views

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

Introduction to the Apache Web Server - ApacheCon

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.4 Sections<br />

May also see <strong>the</strong>m referred <strong>to</strong> as containers, or scope.<br />

<br />

... directives ...<br />

<br />

A section defines <strong>the</strong> scope in which a particular directive, or directives, are effective. In <strong>the</strong> above example,<br />

<strong>the</strong> directives are effective only when content is being loaded from <strong>the</strong> direc<strong>to</strong>ry/usr/local/apache/htdocs.<br />

Sections apply <strong>to</strong> everything beneath <strong>the</strong>m. That is <strong>to</strong> say, content coming out of/usr/local/apache/htdocs/rodents<br />

is also subject <strong>to</strong> <strong>the</strong>se directives.<br />

• <br />

<br />

Options +Indexes<br />

<br />

Restricts <strong>the</strong> contained directives <strong>to</strong> <strong>the</strong> specified direc<strong>to</strong>ry, and subdirec<strong>to</strong>ries <strong>the</strong>reof.<br />

• <br />

<br />

Options +Indexes<br />

<br />

Restricts <strong>the</strong> contained directives <strong>to</strong> direc<strong>to</strong>ries that match <strong>the</strong> specified pattern. In <strong>the</strong> given example,<br />

any direc<strong>to</strong>ry that contains <strong>the</strong> string download or Download will have <strong>the</strong> directive applied <strong>to</strong> it.<br />

• <br />

• <br />

Allowing you <strong>to</strong> be a little more fine-grained, you can specify a particular file or set of files. The<br />

directive takes just one file as an argument, which is perhaps not expected, given <strong>the</strong> name<br />

of <strong>the</strong> directive. To specify more than one file, you can use FilesMatch:<br />

<br />

SetType text/plain<br />

<br />

• <br />

If a particular -D variable is defined, <strong>the</strong>n use this configuration. For example, you might start <strong>the</strong><br />

server with:<br />

24

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

Saved successfully!

Ooh no, something went wrong!