File: config.html

package info (click to toggle)
mod-proxy-html 2.4.3-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 100 kB
  • ctags: 92
  • sloc: ansic: 922; sh: 54; makefile: 34
file content (146 lines) | stat: -rw-r--r-- 6,932 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en"><head>
<title>mod_proxy_html</title>
<style type="text/css">
@import url(/index.css) ;
</style>
</head><body>
<div id="apache">
<h1>mod_proxy_html: Configuration</h1>
<p><a href="./">mod_proxy_html</a> Version 2.4 (Sept-Nov 2004)</p>
<h2>Configuration Directives</h2>
<p>The following can be used anywhere in an <strong>httpd.conf</strong>
or included configuration file.</p>
<dl>
<dt>ProxyHTMLURLMap</dt>
<dd>
<p>Syntax:
<code>ProxyHTMLURLMap	from-pattern	to-pattern flags</code></p>
<p>This is the key directive for rewriting HTML links.  When parsing a document,
whenever a link target matches <samp>from-pattern</samp>, the matching
portion will be rewritten to <samp>to-pattern</samp>.</p>
<p>Starting at version 2.0, this supports a wider range of pattern-matching
and substitutions, including regular expression search and replace,
controlled by the optional third <code>flags</code> argument.
</p>
<h3>Flags for ProxyHTMLURLMap</h3>
<p>Flags are case-sensitive.</p>
<dl class="table">
<dt>h</dt>
<dd><p>Ignore HTML links (pass through unchanged)</p></dd>
<dt>e</dt>
<dd><p>Ignore scripting events (pass through unchanged)</p></dd>
<dt>c</dt>
<dd><p>Pass embedded script and style sections through untouched.</p></dd>
<dt>L</dt>
<dd><p>Last-match.  If this rule matches, no more rules are applied
(note that this happens automatically for HTML links).</p></dd>
<dt>R</dt>
<dd><p>Use Regular Expression matching-and-replace.  <code>from-pattern</code>
is a regexp, and <code>to-pattern</code> a replacement string that may be
based on the regexp.  Regexp memory is supported: you can use brackets ()
in the <code>from-pattern</code> and retrieve the matches with $1 to $9
in the <code>to-pattern</code>.</p>
<p>If R is not set, it will use string-literal search-and-replace, as in
versions 1.x.  Logic is <em>starts-with</em> in HTML links, but
<em>contains</em> in scripting events and embedded script and style sections.
</p>
</dd>
<dt>x</dt>
<dd><p>Use POSIX extended Regular Expressions.  Only applicable with R.</p></dd>
<dt>i</dt>
<dd><p>Case-insensitive matching.  Only applicable with R.</p></dd>
<dt>n</dt>
<dd><p>Disable regexp memory (for speed).  Only applicable with R.</p></dd>
<dt>s</dt>
<dd><p>Line-based regexp matching.  Only applicable with R.</p></dd>
<dt>^</dt>
<dd><p>Match at start only.  This applies only to string matching
(not regexps) and is irrelevant to HTML links.</p></dd>
<dt>$</dt>
<dd><p>Match at end only.  This applies only to string matching
(not regexps) and is irrelevant to HTML links.</p></dd>
</dl>
<!-- <h4>Examples</h4> -->
</dd>
<dt>ProxyHTMLDoctype</dt>
<dd>
<p>Syntax: <code>ProxyHTMLDoctype HTML|XHTML [Legacy]</code></p>
<p>Alternative Syntax: <code>ProxyHTMLDocType fpi [SGML|XML]</code></p>
<p>In the first form, documents will be declared as HTML 4.01 or XHTML 1.0
according to the option selected.  This option also determines whether
HTML or XHTML syntax is used for output.   Note that the format of the
documents coming from the backend server is immaterial: the parser will
deal with it automatically.  If the optional second argument is set to
"Legacy", documents will be declared "Transitional", an option that may
be necessary if you are proxying pre-1998 content or working with defective
authoring/publishing tools.</p>
<p>In the second form, it will insert your own <abbr
title="Formal Public Identifier">FPI</abbr>.  The optional second
argument determines whether SGML/HTML or XML/XHTML syntax will be used.</p>
<p>Starting at version 2.0, the default is changed to omitting any FPI,
on the grounds that no FPI is better than a bogus one.  If your backend
generates decent HTML or XHTML, set it accordingly.</p>
</dd>
<dt>ProxyHTMLFixups</dt>
<dd>
<p>Syntax: <code>ProxyHTMLFixups [lowercase] [dospath] [reset]</code></p>
<p>This directive takes one to three arguments as follows:</p>
<ul>
<li><code>lowercase</code> Urls are rewritten to lowercase</li>
<li><code>dospath</code> Backslashes in URLs are rewritten to forward slashes.</li>
<li><code>reset</code> Unset any options set at a higher level in the configuration.</li>
</ul>
<p>Take care when using these.  The fixes will correct certain authoring
mistakes, but risk also erroneously fixing links that were correct to start with.
Only use them if you know you have a broken backend server.</p> 
</dd>
<dt>ProxyHTMLMeta</dt>
<dd><p>Syntax <code>ProxyHTMLMeta [On|Off]</code></p>
<p>Parses <code>&lt;meta http-equiv ...&gt;</code> elements to real HTTP
headers.</p>
</dd>
<dt>ProxyHTMLExtended</dt>
<dd><p>Syntax <code>ProxyHTMLExtended [On|Off]</code></p>
<p>Set to <code>Off</code>, this gives the same behaviour as 1.x versions
of mod_proxy_html.  HTML links are rewritten according the ProxyHTMLURLMap
directives, but links appearing in Javascript and CSS are ignored.</p>
<p>Set to <code>On</code>, all scripting events and embedded scripts or
stylesheets are also processed by the ProxyHTMLURLMap rules, according to
the flags set for each rule.  Since this requires more parsing, performance
will be best if you only enable it when strictly necessary.</p>
</dd>
<dt>ProxyHTMLStripComments</dt>
<dd><p>Syntax <code>ProxyHTMLStripComments [On|Off]</code></p>
<p>This directive will cause mod_proxy_html to strip HTML comments.
Note that this will also kill off any scripts or styles embedded in
comments (a bogosity introduced in 1995/6 with Netscape 2 for the
benefit of then-older browsers, but still in use today).
It may also interfere with comment-based processors such as SSI or ESI:
be sure to run any of those <em>before</em> mod_proxy_html in the
filter chain if stripping comments!</p>
</dd>
<dt>ProxyHTMLLogVerbose</dt>
<dd><p>Syntax <code>ProxyHTMLLogVerbose [On|Off]</code></p>
<p>Turns on verbose logging.  This causes mod_proxy_html to make
error log entries (at <code>LogLevel Info</code>) about charset
detection and about all meta substitutions and rewrites made.
When Off, only errors and warnings (if any) are logged.</p>
</dd>
<dt>ProxyHTMLBufSize</dt>
<dd><p>Syntax <code>ProxyHTMLBufSize nnnn</code></p>
<p>Set the buffer size increment for buffering inline stylesheets and scripts.</p>
<p>In order to parse non-HTML content (stylesheets and scripts), mod_proxy_html
has to read the entire script or stylesheet into a buffer.  This buffer will
be expanded as necessary to hold the largest script or stylesheet in a page,
in increments of [nnnn] as set by this directive.</p>
<p>The default is 8192, and will work well for almost all pages.  However,
if you know you're proxying a lot of pages containing stylesheets and/or
scripts bigger than 8K, it will be more efficient to set a larger buffer
size and avoid the need to resize the buffer dynamically during a request.
</p>
</dd>
</dl>
</div>
</body></html>