Regenerate HTML docs with recent changes
[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.26 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.26 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="AEN902" id=
55             "AEN902"></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.26/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.</p>
122       <p>The installed defaults provide a reasonable starting point, though
123       some settings may be aggressive by some standards. For the time being,
124       the principle configuration files are:</p>
125       <ul>
126         <li>
127           <p>The <a href="config.html">main configuration file</a> is named
128           <tt class="FILENAME">config</tt> on Linux, Unix, BSD, OS/2, and
129           AmigaOS and <tt class="FILENAME">config.txt</tt> on Windows. This
130           is a required file.</p>
131         </li>
132         <li>
133           <p><tt class="FILENAME">match-all.action</tt> is used to define
134           which <span class="QUOTE">"actions"</span> relating to
135           banner-blocking, images, pop-ups, content modification, cookie
136           handling etc should be applied by default. It should be the first
137           actions file loaded.</p>
138           <p><tt class="FILENAME">default.action</tt> defines many exceptions
139           (both positive and negative) from the default set of actions that's
140           configured in <tt class="FILENAME">match-all.action</tt>. It should
141           be the second actions file loaded and shouldn't be edited by the
142           user.</p>
143           <p>Multiple actions files may be defined in <tt class=
144           "FILENAME">config</tt>. These are processed in the order they are
145           defined. Local customizations and locally preferred exceptions to
146           the default policies as defined in <tt class=
147           "FILENAME">match-all.action</tt> (which you will most probably want
148           to define sooner or later) are best applied in <tt class=
149           "FILENAME">user.action</tt>, where you can preserve them across
150           upgrades. The file isn't installed by all installers, but you can
151           easily create it yourself with a text editor.</p>
152           <p>There is also a web based editor that can be accessed from
153           <a href="http://config.privoxy.org/show-status" target=
154           "_top">http://config.privoxy.org/show-status</a> (Shortcut:
155           <a href="http://p.p/show-status" target=
156           "_top">http://p.p/show-status</a>) for the various actions
157           files.</p>
158         </li>
159         <li>
160           <p><span class="QUOTE">"Filter files"</span> (the <a href=
161           "filter-file.html">filter file</a>) can be used to re-write the raw
162           page content, including viewable text as well as embedded HTML and
163           JavaScript, and whatever else lurks on any given web page. The
164           filtering jobs are only pre-defined here; whether to apply them or
165           not is up to the actions files. <tt class=
166           "FILENAME">default.filter</tt> includes various filters made
167           available for use by the developers. Some are much more intrusive
168           than others, and all should be used with caution. You may define
169           additional filter files in <tt class="FILENAME">config</tt> as you
170           can with actions files. We suggest <tt class=
171           "FILENAME">user.filter</tt> for any locally defined filters or
172           customizations.</p>
173         </li>
174       </ul>
175       <p>The syntax of the configuration and filter files may change between
176       different Privoxy versions, unfortunately some enhancements cost
177       backwards compatibility.</p>
178       <p>All files use the <span class="QUOTE">"<tt class=
179       "LITERAL">#</tt>"</span> character to denote a comment (the rest of the
180       line will be ignored) and understand line continuation through placing
181       a backslash ("<tt class="LITERAL">\</tt>") as the very last character
182       in a line. If the <tt class="LITERAL">#</tt> is preceded by a
183       backslash, it looses its special function. Placing a <tt class=
184       "LITERAL">#</tt> in front of an otherwise valid configuration line to
185       prevent it from being interpreted is called "commenting out" that line.
186       Blank lines are ignored.</p>
187       <p>The actions files and filter files can use Perl style <a href=
188       "appendix.html#REGEX">regular expressions</a> for maximum
189       flexibility.</p>
190       <p>After making any changes, there is no need to restart <span class=
191       "APPLICATION">Privoxy</span> in order for the changes to take effect.
192       <span class="APPLICATION">Privoxy</span> detects such changes
193       automatically. Note, however, that it may take one or two additional
194       requests for the change to take effect. When changing the listening
195       address of <span class="APPLICATION">Privoxy</span>, these <span class=
196       "QUOTE">"wake up"</span> requests must obviously be sent to the
197       <span class="emphasis"><i class="EMPHASIS">old</i></span> listening
198       address.</p>
199     </div>
200   </div>
201   <div class="NAVFOOTER">
202     <hr align="left" width="100%">
203     <table summary="Footer navigation table" width="100%" border="0"
204     cellpadding="0" cellspacing="0">
205       <tr>
206         <td width="33%" align="left" valign="top"><a href="startup.html"
207         accesskey="P">Prev</a></td>
208         <td width="34%" align="center" valign="top"><a href="index.html"
209         accesskey="H">Home</a></td>
210         <td width="33%" align="right" valign="top"><a href="config.html"
211         accesskey="N">Next</a></td>
212       </tr>
213       <tr>
214         <td width="33%" align="left" valign="top">Starting Privoxy</td>
215         <td width="34%" align="center" valign="top">&nbsp;</td>
216         <td width="33%" align="right" valign="top">The Main Configuration
217         File</td>
218       </tr>
219     </table>
220   </div>
221 </body>
222 </html>