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