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