rebuild docs
[privoxy.git] / doc / webserver / user-manual / configuration.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >Privoxy Configuration</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9 REL="HOME"
10 TITLE="Privoxy 3.0.27 User Manual"
11 HREF="index.html"><LINK
12 REL="PREVIOUS"
13 TITLE="Starting Privoxy"
14 HREF="startup.html"><LINK
15 REL="NEXT"
16 TITLE="The Main Configuration File"
17 HREF="config.html"><LINK
18 REL="STYLESHEET"
19 TYPE="text/css"
20 HREF="../p_doc.css"><META
21 HTTP-EQUIV="Content-Type"
22 CONTENT="text/html;
23 charset=ISO-8859-1">
24 <LINK REL="STYLESHEET" TYPE="text/css" HREF="p_doc.css">
25 </head
26 ><BODY
27 CLASS="SECT1"
28 BGCOLOR="#EEEEEE"
29 TEXT="#000000"
30 LINK="#0000FF"
31 VLINK="#840084"
32 ALINK="#0000FF"
33 ><DIV
34 CLASS="NAVHEADER"
35 ><TABLE
36 SUMMARY="Header navigation table"
37 WIDTH="100%"
38 BORDER="0"
39 CELLPADDING="0"
40 CELLSPACING="0"
41 ><TR
42 ><TH
43 COLSPAN="3"
44 ALIGN="center"
45 >Privoxy 3.0.27 User Manual</TH
46 ></TR
47 ><TR
48 ><TD
49 WIDTH="10%"
50 ALIGN="left"
51 VALIGN="bottom"
52 ><A
53 HREF="startup.html"
54 ACCESSKEY="P"
55 >Prev</A
56 ></TD
57 ><TD
58 WIDTH="80%"
59 ALIGN="center"
60 VALIGN="bottom"
61 ></TD
62 ><TD
63 WIDTH="10%"
64 ALIGN="right"
65 VALIGN="bottom"
66 ><A
67 HREF="config.html"
68 ACCESSKEY="N"
69 >Next</A
70 ></TD
71 ></TR
72 ></TABLE
73 ><HR
74 ALIGN="LEFT"
75 WIDTH="100%"></DIV
76 ><DIV
77 CLASS="SECT1"
78 ><H1
79 CLASS="SECT1"
80 ><A
81 NAME="CONFIGURATION"
82 >6. Privoxy Configuration</A
83 ></H1
84 ><P
85 >  All <SPAN
86 CLASS="APPLICATION"
87 >Privoxy</SPAN
88 > configuration is stored
89   in text files. These files can be edited with a text editor.
90   Many important aspects of <SPAN
91 CLASS="APPLICATION"
92 >Privoxy</SPAN
93 > can
94   also be controlled easily with a web browser.
95  </P
96 ><DIV
97 CLASS="SECT2"
98 ><H2
99 CLASS="SECT2"
100 ><A
101 NAME="CONTROL-WITH-WEBBROWSER"
102 >6.1. Controlling Privoxy with Your Web Browser</A
103 ></H2
104 ><P
105 > <SPAN
106 CLASS="APPLICATION"
107 >Privoxy</SPAN
108 >'s user interface can be reached through the special
109  URL <A
110 HREF="http://config.privoxy.org/"
111 TARGET="_top"
112 >http://config.privoxy.org/</A
113 >
114  (shortcut: <A
115 HREF="http://p.p/"
116 TARGET="_top"
117 >http://p.p/</A
118 >),
119  which is a built-in page and works without Internet access.
120  You will see the following section:</P
121 ><TABLE
122 BORDER="0"
123 BGCOLOR="#E0E0E0"
124 WIDTH="100%"
125 ><TR
126 ><TD
127 ><PRE
128 CLASS="SCREEN"
129 > <H2
130 CLASS="BRIDGEHEAD"
131 ><A
132 NAME="AEN914"
133 ></A
134 >    Privoxy Menu</H2
135 ><P
136 ></P
137 ><TABLE
138 BORDER="0"
139 ><TBODY
140 ><TR
141 ><TD
142 >          &#9642;  <A
143 HREF="http://config.privoxy.org/show-status"
144 TARGET="_top"
145 >View &#38; change the current configuration</A
146 >
147  </TD
148 ></TR
149 ><TR
150 ><TD
151 >          &#9642;  <A
152 HREF="http://config.privoxy.org/show-version"
153 TARGET="_top"
154 >View the source code version numbers</A
155 >
156  </TD
157 ></TR
158 ><TR
159 ><TD
160 >          &#9642;  <A
161 HREF="http://config.privoxy.org/show-request"
162 TARGET="_top"
163 >View the request headers.</A
164 >
165  </TD
166 ></TR
167 ><TR
168 ><TD
169 >          &#9642;  <A
170 HREF="http://config.privoxy.org/show-url-info"
171 TARGET="_top"
172 >Look up which actions apply to a URL and why</A
173 >
174  </TD
175 ></TR
176 ><TR
177 ><TD
178 >          &#9642;  <A
179 HREF="http://config.privoxy.org/toggle"
180 TARGET="_top"
181 >Toggle Privoxy on or off</A
182 >
183  </TD
184 ></TR
185 ><TR
186 ><TD
187 >          &#9642;  <A
188 HREF="https://www.privoxy.org/3.0.27/user-manual/"
189 TARGET="_top"
190 >Documentation</A
191 >
192  </TD
193 ></TR
194 ></TBODY
195 ></TABLE
196 ><P
197 ></P
198 ></PRE
199 ></TD
200 ></TR
201 ></TABLE
202 ><P
203 > This should be self-explanatory. Note the first item leads to an editor for the
204  <A
205 HREF="actions-file.html"
206 >actions files</A
207 >, which is where the ad, banner,
208  cookie, and URL blocking magic is configured as well as other advanced features of
209  <SPAN
210 CLASS="APPLICATION"
211 >Privoxy</SPAN
212 >. This is an easy way to adjust various
213  aspects of <SPAN
214 CLASS="APPLICATION"
215 >Privoxy</SPAN
216 > configuration. The actions
217  file, and other configuration files, are explained in detail below.</P
218 ><P
219 > <SPAN
220 CLASS="QUOTE"
221 >"Toggle Privoxy On or Off"</SPAN
222 > is handy for sites that might
223  have problems with your current actions and filters. You can in fact use
224  it as a test to see whether it is <SPAN
225 CLASS="APPLICATION"
226 >Privoxy</SPAN
227 >
228  causing the problem or not. <SPAN
229 CLASS="APPLICATION"
230 >Privoxy</SPAN
231 > continues
232  to run as a proxy in this case, but all manipulation is disabled, i.e.
233  <SPAN
234 CLASS="APPLICATION"
235 >Privoxy</SPAN
236 > acts like a normal forwarding proxy.</P
237 ><P
238 > Note that several of the features described above are disabled by default
239  in <SPAN
240 CLASS="APPLICATION"
241 >Privoxy</SPAN
242 > 3.0.7 beta and later.
243  Check the
244  <A
245 HREF="config.html"
246 TARGET="_top"
247 >configuration file</A
248 > to learn why
249  and in which cases it's safe to enable them again.</P
250 ></DIV
251 ><DIV
252 CLASS="SECT2"
253 ><H2
254 CLASS="SECT2"
255 ><A
256 NAME="CONFOVERVIEW"
257 >6.2. Configuration Files Overview</A
258 ></H2
259 ><P
260 > For Unix, *BSD and Linux, all configuration files are located in
261  <TT
262 CLASS="FILENAME"
263 >/etc/privoxy/</TT
264 > by default. For MS Windows, OS/2, and
265  AmigaOS these are all in the same directory as the
266  <SPAN
267 CLASS="APPLICATION"
268 >Privoxy</SPAN
269 > executable.  The name
270  and number of configuration files has changed from previous versions, and is
271  subject to change as development progresses.</P
272 ><P
273 > The installed defaults provide a reasonable starting point, though
274  some settings may be aggressive by some standards. For the time being, the
275  principle configuration files are:</P
276 ><P
277 ></P
278 ><UL
279 ><LI
280 ><P
281 >     The <A
282 HREF="config.html"
283 >main configuration file</A
284 > is named <TT
285 CLASS="FILENAME"
286 >config</TT
287 >
288      on Linux, Unix, BSD, OS/2, and AmigaOS and <TT
289 CLASS="FILENAME"
290 >config.txt</TT
291 >
292      on Windows. This is a required file.
293    </P
294 ></LI
295 ><LI
296 ><P
297 >    <TT
298 CLASS="FILENAME"
299 >match-all.action</TT
300 > is used to define which <SPAN
301 CLASS="QUOTE"
302 >"actions"</SPAN
303 >
304     relating to banner-blocking, images, pop-ups, content modification, cookie handling
305     etc should be applied by default. It should be the first actions file loaded.
306    </P
307 ><P
308 >    <TT
309 CLASS="FILENAME"
310 >default.action</TT
311 > defines many exceptions (both positive and negative)
312     from the default set of actions that's configured in <TT
313 CLASS="FILENAME"
314 >match-all.action</TT
315 >.
316     It should be the second actions file loaded and shouldn't be edited by the user.
317    </P
318 ><P
319 >    Multiple actions files may be defined in <TT
320 CLASS="FILENAME"
321 >config</TT
322 >. These
323     are processed in the order they are defined. Local customizations and locally
324     preferred exceptions to the default policies as defined in
325     <TT
326 CLASS="FILENAME"
327 >match-all.action</TT
328 > (which you will most probably want
329     to define sooner or later) are best applied in <TT
330 CLASS="FILENAME"
331 >user.action</TT
332 >,
333     where you can preserve them across upgrades. The file isn't installed by all
334     installers, but you can easily create it yourself with a text editor.
335    </P
336 ><P
337 >    There is also a web based editor that can be accessed from
338     <A
339 HREF="http://config.privoxy.org/show-status"
340 TARGET="_top"
341 >http://config.privoxy.org/show-status</A
342 >
343     (Shortcut: <A
344 HREF="http://p.p/show-status"
345 TARGET="_top"
346 >http://p.p/show-status</A
347 >) for the
348     various actions files.
349    </P
350 ></LI
351 ><LI
352 ><P
353 >    <SPAN
354 CLASS="QUOTE"
355 >"Filter files"</SPAN
356 > (the <A
357 HREF="filter-file.html"
358 >filter
359     file</A
360 >) can be used to re-write the raw page content, including
361     viewable text as well as embedded HTML and JavaScript, and whatever else
362     lurks on any given web page. The filtering jobs are only pre-defined here;
363     whether to apply them or not is up to the actions files.
364     <TT
365 CLASS="FILENAME"
366 >default.filter</TT
367 > includes various filters made
368     available for use by the developers. Some are much more intrusive than
369     others, and all should be used with caution. You may define additional
370     filter files in <TT
371 CLASS="FILENAME"
372 >config</TT
373 > as you can with
374     actions files. We suggest <TT
375 CLASS="FILENAME"
376 >user.filter</TT
377 > for any
378     locally defined filters or customizations.
379    </P
380 ></LI
381 ></UL
382 ><P
383 > The syntax of the configuration and filter files may change between different
384  Privoxy versions, unfortunately some enhancements cost backwards compatibility.
385  </P
386 ><P
387 > All files use the <SPAN
388 CLASS="QUOTE"
389 >"<TT
390 CLASS="LITERAL"
391 >#</TT
392 >"</SPAN
393 > character to denote a
394  comment (the rest of the line will be ignored) and understand line continuation
395  through placing a backslash ("<TT
396 CLASS="LITERAL"
397 >\</TT
398 >") as the very last character
399  in a line. If the <TT
400 CLASS="LITERAL"
401 >#</TT
402 > is preceded by a backslash, it looses
403  its special function. Placing a <TT
404 CLASS="LITERAL"
405 >#</TT
406 > in front of an otherwise
407  valid configuration line to prevent it from being interpreted is called "commenting
408  out" that line. Blank lines are ignored.</P
409 ><P
410 > The actions files and filter files
411  can use Perl style <A
412 HREF="appendix.html#REGEX"
413 >regular expressions</A
414 > for
415  maximum flexibility.</P
416 ><P
417 > After making any changes, there is no need to restart
418  <SPAN
419 CLASS="APPLICATION"
420 >Privoxy</SPAN
421 > in order for the changes to take
422  effect. <SPAN
423 CLASS="APPLICATION"
424 >Privoxy</SPAN
425 > detects such changes
426  automatically. Note, however, that it may take one or two additional
427  requests for the change to take effect. When changing the listening address
428  of <SPAN
429 CLASS="APPLICATION"
430 >Privoxy</SPAN
431 >, these <SPAN
432 CLASS="QUOTE"
433 >"wake up"</SPAN
434 > requests
435  must obviously be sent to the <SPAN
436 CLASS="emphasis"
437 ><I
438 CLASS="EMPHASIS"
439 >old</I
440 ></SPAN
441 > listening address.</P
442 ><P
443 > While under development, the configuration content is subject to change.
444  The below documentation may not be accurate by the time you read this.
445  Also, what constitutes a <SPAN
446 CLASS="QUOTE"
447 >"default"</SPAN
448 > setting, may change, so
449  please check all your configuration files on important issues.</P
450 ></DIV
451 ></DIV
452 ><DIV
453 CLASS="NAVFOOTER"
454 ><HR
455 ALIGN="LEFT"
456 WIDTH="100%"><TABLE
457 SUMMARY="Footer navigation table"
458 WIDTH="100%"
459 BORDER="0"
460 CELLPADDING="0"
461 CELLSPACING="0"
462 ><TR
463 ><TD
464 WIDTH="33%"
465 ALIGN="left"
466 VALIGN="top"
467 ><A
468 HREF="startup.html"
469 ACCESSKEY="P"
470 >Prev</A
471 ></TD
472 ><TD
473 WIDTH="34%"
474 ALIGN="center"
475 VALIGN="top"
476 ><A
477 HREF="index.html"
478 ACCESSKEY="H"
479 >Home</A
480 ></TD
481 ><TD
482 WIDTH="33%"
483 ALIGN="right"
484 VALIGN="top"
485 ><A
486 HREF="config.html"
487 ACCESSKEY="N"
488 >Next</A
489 ></TD
490 ></TR
491 ><TR
492 ><TD
493 WIDTH="33%"
494 ALIGN="left"
495 VALIGN="top"
496 >Starting Privoxy</TD
497 ><TD
498 WIDTH="34%"
499 ALIGN="center"
500 VALIGN="top"
501 >&nbsp;</TD
502 ><TD
503 WIDTH="33%"
504 ALIGN="right"
505 VALIGN="top"
506 >The Main Configuration File</TD
507 ></TR
508 ></TABLE
509 ></DIV
510 ></BODY
511 ></HTML
512 >