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