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