Sync with user-manual.sgml 2.73.
[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.9 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.9 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="AEN822"
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:&#13;</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="AEN830"
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="http://www.privoxy.org/   3.0.9/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. There
237  is even a toggle <A
238 HREF="appendix.html#BOOKMARKLETS"
239 >Bookmarklet</A
240 > offered, so
241  that you can toggle <SPAN
242 CLASS="APPLICATION"
243 >Privoxy</SPAN
244 > with one click from
245  your browser.</P
246 ><P
247 > Note that several of the features described above are disabled by default
248  in <SPAN
249 CLASS="APPLICATION"
250 >Privoxy</SPAN
251 > 3.0.7 beta and later.
252  Check the
253  <A
254 HREF="config.html"
255 TARGET="_top"
256 >configuration file</A
257 > to learn why
258  and in which cases it's safe to enable them again.</P
259 ></DIV
260 ><DIV
261 CLASS="SECT2"
262 ><H2
263 CLASS="SECT2"
264 ><A
265 NAME="CONFOVERVIEW"
266 >6.2. Configuration Files Overview</A
267 ></H2
268 ><P
269 > For Unix, *BSD and Linux, all configuration files are located in
270  <TT
271 CLASS="FILENAME"
272 >/etc/privoxy/</TT
273 > by default. For MS Windows, OS/2, and
274  AmigaOS these are all in the same directory as the 
275  <SPAN
276 CLASS="APPLICATION"
277 >Privoxy</SPAN
278 > executable.  The name
279  and number of configuration files has changed from previous versions, and is
280  subject to change as development progresses.</P
281 ><P
282 > The installed defaults provide a reasonable starting point, though 
283  some settings may be aggressive by some standards. For the time being, the
284  principle configuration files are:</P
285 ><P
286 > <P
287 ></P
288 ><UL
289 ><LI
290 ><P
291 >     The <A
292 HREF="config.html"
293 >main configuration file</A
294 > is named <TT
295 CLASS="FILENAME"
296 >config</TT
297 >
298      on Linux, Unix, BSD, OS/2, and AmigaOS and <TT
299 CLASS="FILENAME"
300 >config.txt</TT
301 >
302      on Windows. This is a required file.
303    </P
304 ></LI
305 ><LI
306 ><P
307 >    <TT
308 CLASS="FILENAME"
309 >default.action</TT
310 > (the main <A
311 HREF="actions-file.html"
312 >actions file</A
313 >)
314     is used to define which <SPAN
315 CLASS="QUOTE"
316 >"actions"</SPAN
317 > relating to banner-blocking, images, pop-ups,
318     content modification, cookie handling etc should be applied by default. It also defines many
319     exceptions (both positive and negative) from this default set of actions that enable 
320     <SPAN
321 CLASS="APPLICATION"
322 >Privoxy</SPAN
323 > to selectively eliminate the junk, and only the junk, on
324     as many websites as possible.
325    </P
326 ><P
327 >    Multiple actions files may be defined in <TT
328 CLASS="FILENAME"
329 >config</TT
330 >. These 
331     are processed in the order they are defined. Local customizations and locally 
332     preferred exceptions to the default policies  as defined in
333     <TT
334 CLASS="FILENAME"
335 >default.action</TT
336 > (which you will most probably want
337     to define sooner or later) are probably best applied in
338     <TT
339 CLASS="FILENAME"
340 >user.action</TT
341 >, where you can preserve them across
342     upgrades. <TT
343 CLASS="FILENAME"
344 >standard.action</TT
345 > is only for
346     <SPAN
347 CLASS="APPLICATION"
348 >Privoxy's</SPAN
349 > internal use.
350    </P
351 ><P
352 >    
353     There is also a web based editor that can be accessed from
354     <A
355 HREF="http://config.privoxy.org/show-status"
356 TARGET="_top"
357 >http://config.privoxy.org/show-status</A
358 >
359     (Shortcut: <A
360 HREF="http://p.p/show-status"
361 TARGET="_top"
362 >http://p.p/show-status</A
363 >) for the
364     various actions files. 
365    </P
366 ></LI
367 ><LI
368 ><P
369 >    <SPAN
370 CLASS="QUOTE"
371 >"Filter files"</SPAN
372 > (the <A
373 HREF="filter-file.html"
374 >filter
375     file</A
376 >) can be used to re-write the raw page content, including
377     viewable text as well as embedded HTML and JavaScript, and whatever else
378     lurks on any given web page. The filtering jobs are only pre-defined here;
379     whether to apply them or not is up to the actions files. 
380     <TT
381 CLASS="FILENAME"
382 >default.filter</TT
383 > includes various filters made 
384     available for use by the developers. Some are much more intrusive than 
385     others, and all should be used with caution. You may define additional 
386     filter files in <TT
387 CLASS="FILENAME"
388 >config</TT
389 > as you can with 
390     actions files. We suggest <TT
391 CLASS="FILENAME"
392 >user.filter</TT
393 > for any 
394     locally defined filters or customizations.
395    </P
396 ></LI
397 ></UL
398 ></P
399 ><P
400 > The syntax of the configuration and filter files may change between different
401  Privoxy versions, unfortunately some enhancements cost backwards compatibility.
402  </P
403 ><P
404 > All files use the <SPAN
405 CLASS="QUOTE"
406 >"<TT
407 CLASS="LITERAL"
408 >#</TT
409 >"</SPAN
410 > character to denote a
411  comment (the rest of the line will be ignored) and understand line continuation
412  through placing a backslash ("<TT
413 CLASS="LITERAL"
414 >\</TT
415 >") as the very last character
416  in a line. If the <TT
417 CLASS="LITERAL"
418 >#</TT
419 > is preceded by a backslash, it looses
420  its special function. Placing a <TT
421 CLASS="LITERAL"
422 >#</TT
423 > in front of an otherwise
424  valid configuration line to prevent it from being interpreted is called "commenting
425  out" that line. Blank lines are ignored.</P
426 ><P
427 > The actions files and filter files  
428  can use Perl style <A
429 HREF="appendix.html#REGEX"
430 >regular expressions</A
431 > for
432  maximum flexibility. </P
433 ><P
434 > After making any changes, there is no need to restart
435  <SPAN
436 CLASS="APPLICATION"
437 >Privoxy</SPAN
438 > in order for the changes to take
439  effect. <SPAN
440 CLASS="APPLICATION"
441 >Privoxy</SPAN
442 > detects such changes 
443  automatically. Note, however, that it may take one or two additional
444  requests for the change to take effect. When changing the listening address
445  of <SPAN
446 CLASS="APPLICATION"
447 >Privoxy</SPAN
448 >, these <SPAN
449 CLASS="QUOTE"
450 >"wake up"</SPAN
451 > requests
452  must obviously be sent to the <SPAN
453 CLASS="emphasis"
454 ><I
455 CLASS="EMPHASIS"
456 >old</I
457 ></SPAN
458 > listening address.</P
459 ><P
460 > While under development, the configuration content is subject to change. 
461  The below documentation may not be accurate by the time you read this. 
462  Also, what constitutes a <SPAN
463 CLASS="QUOTE"
464 >"default"</SPAN
465 > setting, may change, so 
466  please check all your configuration files on important issues.</P
467 ></DIV
468 ></DIV
469 ><DIV
470 CLASS="NAVFOOTER"
471 ><HR
472 ALIGN="LEFT"
473 WIDTH="100%"><TABLE
474 SUMMARY="Footer navigation table"
475 WIDTH="100%"
476 BORDER="0"
477 CELLPADDING="0"
478 CELLSPACING="0"
479 ><TR
480 ><TD
481 WIDTH="33%"
482 ALIGN="left"
483 VALIGN="top"
484 ><A
485 HREF="startup.html"
486 ACCESSKEY="P"
487 >Prev</A
488 ></TD
489 ><TD
490 WIDTH="34%"
491 ALIGN="center"
492 VALIGN="top"
493 ><A
494 HREF="index.html"
495 ACCESSKEY="H"
496 >Home</A
497 ></TD
498 ><TD
499 WIDTH="33%"
500 ALIGN="right"
501 VALIGN="top"
502 ><A
503 HREF="config.html"
504 ACCESSKEY="N"
505 >Next</A
506 ></TD
507 ></TR
508 ><TR
509 ><TD
510 WIDTH="33%"
511 ALIGN="left"
512 VALIGN="top"
513 >Starting Privoxy</TD
514 ><TD
515 WIDTH="34%"
516 ALIGN="center"
517 VALIGN="top"
518 >&nbsp;</TD
519 ><TD
520 WIDTH="33%"
521 ALIGN="right"
522 VALIGN="top"
523 >The Main Configuration File</TD
524 ></TR
525 ></TABLE
526 ></DIV
527 ></BODY
528 ></HTML
529 >