Rebuild user manual for 3.0.27 UNRELEASED
[privoxy.git] / doc / webserver / user-manual / configuration.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3 <html>
4 <head>
5   <title>Privoxy Configuration</title>
6   <meta name="GENERATOR" content=
7   "Modular DocBook HTML Stylesheet Version 1.79">
8   <link rel="HOME" title="Privoxy 3.0.27 User Manual" href="index.html">
9   <link rel="PREVIOUS" title="Starting Privoxy" href="startup.html">
10   <link rel="NEXT" title="The Main Configuration File" href="config.html">
11   <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
12   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
13   <link rel="STYLESHEET" type="text/css" href="p_doc.css">
14 </head>
15 <body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink=
16 "#840084" alink="#0000FF">
17   <div class="NAVHEADER">
18     <table summary="Header navigation table" width="100%" border="0"
19     cellpadding="0" cellspacing="0">
20       <tr>
21         <th colspan="3" align="center">Privoxy 3.0.27 User Manual</th>
22       </tr>
23       <tr>
24         <td width="10%" align="left" valign="bottom"><a href="startup.html"
25         accesskey="P">Prev</a></td>
26         <td width="80%" align="center" valign="bottom"></td>
27         <td width="10%" align="right" valign="bottom"><a href="config.html"
28         accesskey="N">Next</a></td>
29       </tr>
30     </table>
31     <hr align="left" width="100%">
32   </div>
33   <div class="SECT1">
34     <h1 class="SECT1"><a name="CONFIGURATION" id="CONFIGURATION">6. Privoxy
35     Configuration</a></h1>
36     <p>All <span class="APPLICATION">Privoxy</span> configuration is stored
37     in text files. These files can be edited with a text editor. Many
38     important aspects of <span class="APPLICATION">Privoxy</span> can also be
39     controlled easily with a web browser.</p>
40     <div class="SECT2">
41       <h2 class="SECT2"><a name="CONTROL-WITH-WEBBROWSER" id=
42       "CONTROL-WITH-WEBBROWSER">6.1. Controlling Privoxy with Your Web
43       Browser</a></h2>
44       <p><span class="APPLICATION">Privoxy</span>'s user interface can be
45       reached through the special URL <a href="http://config.privoxy.org/"
46       target="_top">http://config.privoxy.org/</a> (shortcut: <a href=
47       "http://p.p/" target="_top">http://p.p/</a>), which is a built-in page
48       and works without Internet access. You will see the following
49       section:</p>
50       <table border="0" bgcolor="#E0E0E0" width="100%">
51         <tr>
52           <td>
53             <pre class="SCREEN"> </pre>
54             <h2 class="BRIDGEHEAD"><a name="AEN904" id=
55             "AEN904"></a>����Privoxy Menu</h2>
56             <pre><br></pre>
57             <table border="0">
58               <tbody>
59                 <tr>
60                   <td>��������▪��<a href=
61                   "http://config.privoxy.org/show-status" target="_top">View
62                   &amp; change the current configuration</a></td>
63                 </tr>
64                 <tr>
65                   <td>��������▪��<a href=
66                   "http://config.privoxy.org/show-version" target="_top">View
67                   the source code version numbers</a></td>
68                 </tr>
69                 <tr>
70                   <td>��������▪��<a href=
71                   "http://config.privoxy.org/show-request" target="_top">View
72                   the request headers.</a></td>
73                 </tr>
74                 <tr>
75                   <td>��������▪��<a href=
76                   "http://config.privoxy.org/show-url-info" target=
77                   "_top">Look up which actions apply to a URL and
78                   why</a></td>
79                 </tr>
80                 <tr>
81                   <td>��������▪��<a href="http://config.privoxy.org/toggle"
82                   target="_top">Toggle Privoxy on or off</a></td>
83                 </tr>
84                 <tr>
85                   <td>��������▪��<a href=
86                   "https://www.privoxy.org/3.0.27/user-manual/" target=
87                   "_top">Documentation</a></td>
88                 </tr>
89               </tbody>
90             </table>
91           </td>
92         </tr>
93       </table>
94       <p>This should be self-explanatory. Note the first item leads to an
95       editor for the <a href="actions-file.html">actions files</a>, which is
96       where the ad, banner, cookie, and URL blocking magic is configured as
97       well as other advanced features of <span class=
98       "APPLICATION">Privoxy</span>. This is an easy way to adjust various
99       aspects of <span class="APPLICATION">Privoxy</span> configuration. The
100       actions file, and other configuration files, are explained in detail
101       below.</p>
102       <p><span class="QUOTE">"Toggle Privoxy On or Off"</span> is handy for
103       sites that might have problems with your current actions and filters.
104       You can in fact use it as a test to see whether it is <span class=
105       "APPLICATION">Privoxy</span> causing the problem or not. <span class=
106       "APPLICATION">Privoxy</span> continues to run as a proxy in this case,
107       but all manipulation is disabled, i.e. <span class=
108       "APPLICATION">Privoxy</span> acts like a normal forwarding proxy.</p>
109       <p>Note that several of the features described above are disabled by
110       default in <span class="APPLICATION">Privoxy</span> 3.0.7 beta and
111       later. Check the <a href="config.html" target="_top">configuration
112       file</a> to learn why and in which cases it's safe to enable them
113       again.</p>
114     </div>
115     <div class="SECT2">
116       <h2 class="SECT2"><a name="CONFOVERVIEW" id="CONFOVERVIEW">6.2.
117       Configuration Files Overview</a></h2>
118       <p>For Unix, *BSD and Linux, all configuration files are located in
119       <tt class="FILENAME">/etc/privoxy/</tt> by default. For MS Windows,
120       OS/2, and AmigaOS these are all in the same directory as the
121       <span class="APPLICATION">Privoxy</span> executable. The name and
122       number of configuration files has changed from previous versions, and
123       is subject to change as development progresses.</p>
124       <p>The installed defaults provide a reasonable starting point, though
125       some settings may be aggressive by some standards. For the time being,
126       the principle configuration files are:</p>
127       <ul>
128         <li>
129           <p>The <a href="config.html">main configuration file</a> is named
130           <tt class="FILENAME">config</tt> on Linux, Unix, BSD, OS/2, and
131           AmigaOS and <tt class="FILENAME">config.txt</tt> on Windows. This
132           is a required file.</p>
133         </li>
134         <li>
135           <p><tt class="FILENAME">match-all.action</tt> is used to define
136           which <span class="QUOTE">"actions"</span> relating to
137           banner-blocking, images, pop-ups, content modification, cookie
138           handling etc should be applied by default. It should be the first
139           actions file loaded.</p>
140           <p><tt class="FILENAME">default.action</tt> defines many exceptions
141           (both positive and negative) from the default set of actions that's
142           configured in <tt class="FILENAME">match-all.action</tt>. It should
143           be the second actions file loaded and shouldn't be edited by the
144           user.</p>
145           <p>Multiple actions files may be defined in <tt class=
146           "FILENAME">config</tt>. These are processed in the order they are
147           defined. Local customizations and locally preferred exceptions to
148           the default policies as defined in <tt class=
149           "FILENAME">match-all.action</tt> (which you will most probably want
150           to define sooner or later) are best applied in <tt class=
151           "FILENAME">user.action</tt>, where you can preserve them across
152           upgrades. The file isn't installed by all installers, but you can
153           easily create it yourself with a text editor.</p>
154           <p>There is also a web based editor that can be accessed from
155           <a href="http://config.privoxy.org/show-status" target=
156           "_top">http://config.privoxy.org/show-status</a> (Shortcut:
157           <a href="http://p.p/show-status" target=
158           "_top">http://p.p/show-status</a>) for the various actions
159           files.</p>
160         </li>
161         <li>
162           <p><span class="QUOTE">"Filter files"</span> (the <a href=
163           "filter-file.html">filter file</a>) can be used to re-write the raw
164           page content, including viewable text as well as embedded HTML and
165           JavaScript, and whatever else lurks on any given web page. The
166           filtering jobs are only pre-defined here; whether to apply them or
167           not is up to the actions files. <tt class=
168           "FILENAME">default.filter</tt> includes various filters made
169           available for use by the developers. Some are much more intrusive
170           than others, and all should be used with caution. You may define
171           additional filter files in <tt class="FILENAME">config</tt> as you
172           can with actions files. We suggest <tt class=
173           "FILENAME">user.filter</tt> for any locally defined filters or
174           customizations.</p>
175         </li>
176       </ul>
177       <p>The syntax of the configuration and filter files may change between
178       different Privoxy versions, unfortunately some enhancements cost
179       backwards compatibility.</p>
180       <p>All files use the <span class="QUOTE">"<tt class=
181       "LITERAL">#</tt>"</span> character to denote a comment (the rest of the
182       line will be ignored) and understand line continuation through placing
183       a backslash ("<tt class="LITERAL">\</tt>") as the very last character
184       in a line. If the <tt class="LITERAL">#</tt> is preceded by a
185       backslash, it looses its special function. Placing a <tt class=
186       "LITERAL">#</tt> in front of an otherwise valid configuration line to
187       prevent it from being interpreted is called "commenting out" that line.
188       Blank lines are ignored.</p>
189       <p>The actions files and filter files can use Perl style <a href=
190       "appendix.html#REGEX">regular expressions</a> for maximum
191       flexibility.</p>
192       <p>After making any changes, there is no need to restart <span class=
193       "APPLICATION">Privoxy</span> in order for the changes to take effect.
194       <span class="APPLICATION">Privoxy</span> detects such changes
195       automatically. Note, however, that it may take one or two additional
196       requests for the change to take effect. When changing the listening
197       address of <span class="APPLICATION">Privoxy</span>, these <span class=
198       "QUOTE">"wake up"</span> requests must obviously be sent to the
199       <span class="emphasis"><i class="EMPHASIS">old</i></span> listening
200       address.</p>
201       <p>While under development, the configuration content is subject to
202       change. The below documentation may not be accurate by the time you
203       read this. Also, what constitutes a <span class=
204       "QUOTE">"default"</span> setting, may change, so please check all your
205       configuration files on important issues.</p>
206     </div>
207   </div>
208   <div class="NAVFOOTER">
209     <hr align="left" width="100%">
210     <table summary="Footer navigation table" width="100%" border="0"
211     cellpadding="0" cellspacing="0">
212       <tr>
213         <td width="33%" align="left" valign="top"><a href="startup.html"
214         accesskey="P">Prev</a></td>
215         <td width="34%" align="center" valign="top"><a href="index.html"
216         accesskey="H">Home</a></td>
217         <td width="33%" align="right" valign="top"><a href="config.html"
218         accesskey="N">Next</a></td>
219       </tr>
220       <tr>
221         <td width="33%" align="left" valign="top">Starting Privoxy</td>
222         <td width="34%" align="center" valign="top">&nbsp;</td>
223         <td width="33%" align="right" valign="top">The Main Configuration
224         File</td>
225       </tr>
226     </table>
227   </div>
228 </body>
229 </html>