Synthetic commit for tag v_3_0_1
[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.0 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.0 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="AEN579">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="AEN588">    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.0.0/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. </P
259 ><P
260 > The installed defaults provide a reasonable starting point, though 
261  some settings may be aggressive by some standards. For the time being, the
262  principle configuration files are:</P
263 ><P
264 > <P
265 ></P
266 ><UL
267 ><LI
268 ><P
269 >     The <A
270 HREF="config.html"
271 >main configuration file</A
272 > is named <TT
273 CLASS="FILENAME"
274 >config</TT
275 >
276      on Linux, Unix, BSD, OS/2, and AmigaOS and <TT
277 CLASS="FILENAME"
278 >config.txt</TT
279 >
280      on Windows. This is a required file.
281    </P
282 ></LI
283 ><LI
284 ><P
285 >    <TT
286 CLASS="FILENAME"
287 >default.action</TT
288 > (the main <A
289 HREF="actions-file.html"
290 >actions file</A
291 >)
292     is used to define which <SPAN
293 CLASS="QUOTE"
294 >"actions"</SPAN
295 > relating to banner-blocking, images, pop-ups,
296     content modification, cookie handling etc should be applied by default. It also defines many
297     exceptions (both positive and negative) from this default set of actions that enable 
298     <SPAN
299 CLASS="APPLICATION"
300 >Privoxy</SPAN
301 > to selectively eliminate the junk, and only the junk, on
302     as many websites as possible.
303    </P
304 ><P
305 >    Multiple actions files may be defined in <TT
306 CLASS="FILENAME"
307 >config</TT
308 >. These 
309     are processed in the order they are defined. Local customizations and locally 
310     preferred exceptions to the default policies  as defined in
311     <TT
312 CLASS="FILENAME"
313 >default.action</TT
314 > (which you will most probably want
315     to define sooner or later) are probably best applied in
316     <TT
317 CLASS="FILENAME"
318 >user.action</TT
319 >, where you can preserve them across
320     upgrades. <TT
321 CLASS="FILENAME"
322 >standard.action</TT
323 > is for
324     <SPAN
325 CLASS="APPLICATION"
326 >Privoxy's</SPAN
327 > internal use.
328    </P
329 ><P
330 >    
331     There is also a web based editor that can be accessed from
332     <A
333 HREF="http://config.privoxy.org/show-status"
334 TARGET="_top"
335 >http://config.privoxy.org/show-status</A
336 >
337     (Shortcut: <A
338 HREF="http://p.p/show-status"
339 TARGET="_top"
340 >http://p.p/show-status</A
341 >) for the
342     various actions files. 
343    </P
344 ></LI
345 ><LI
346 ><P
347 >    <TT
348 CLASS="FILENAME"
349 >default.filter</TT
350 > (the <A
351 HREF="filter-file.html"
352 >filter
353     file</A
354 >) can be used to re-write the raw page content, including
355     viewable text as well as embedded HTML and JavaScript, and whatever else
356     lurks on any given web page. The filtering jobs are only pre-defined here;
357     whether to apply them or not is up to the actions files.
358    </P
359 ></LI
360 ></UL
361 ></P
362 ><P
363 > All files use the <SPAN
364 CLASS="QUOTE"
365 >"<TT
366 CLASS="LITERAL"
367 >#</TT
368 >"</SPAN
369 > character to denote a
370  comment (the rest of the line will be ignored) and understand line continuation
371  through placing a backslash ("<TT
372 CLASS="LITERAL"
373 >\</TT
374 >") as the very last character
375  in a line. If the <TT
376 CLASS="LITERAL"
377 >#</TT
378 > is preceded by a backslash, it looses
379  its special function. Placing a <TT
380 CLASS="LITERAL"
381 >#</TT
382 > in front of an otherwise
383  valid configuration line to prevent it from being interpreted is called "commenting
384  out" that line.</P
385 ><P
386 > The actions files and <TT
387 CLASS="FILENAME"
388 >default.filter</TT
389
390  can use Perl style <A
391 HREF="appendix.html#REGEX"
392 >regular expressions</A
393 > for
394  maximum flexibility. </P
395 ><P
396 > After making any changes, there is no need to restart
397  <SPAN
398 CLASS="APPLICATION"
399 >Privoxy</SPAN
400 > in order for the changes to take
401  effect. <SPAN
402 CLASS="APPLICATION"
403 >Privoxy</SPAN
404 > detects such changes 
405  automatically. Note, however, that it may take one or two additional
406  requests for the change to take effect. When changing the listening address
407  of <SPAN
408 CLASS="APPLICATION"
409 >Privoxy</SPAN
410 >, these <SPAN
411 CLASS="QUOTE"
412 >"wake up"</SPAN
413 > requests
414  must obviously be sent to the <SPAN
415 CLASS="emphasis"
416 ><I
417 CLASS="EMPHASIS"
418 >old</I
419 ></SPAN
420 > listening address.</P
421 ></DIV
422 ></DIV
423 ><DIV
424 CLASS="NAVFOOTER"
425 ><HR
426 ALIGN="LEFT"
427 WIDTH="100%"><TABLE
428 SUMMARY="Footer navigation table"
429 WIDTH="100%"
430 BORDER="0"
431 CELLPADDING="0"
432 CELLSPACING="0"
433 ><TR
434 ><TD
435 WIDTH="33%"
436 ALIGN="left"
437 VALIGN="top"
438 ><A
439 HREF="startup.html"
440 ACCESSKEY="P"
441 >Prev</A
442 ></TD
443 ><TD
444 WIDTH="34%"
445 ALIGN="center"
446 VALIGN="top"
447 ><A
448 HREF="index.html"
449 ACCESSKEY="H"
450 >Home</A
451 ></TD
452 ><TD
453 WIDTH="33%"
454 ALIGN="right"
455 VALIGN="top"
456 ><A
457 HREF="config.html"
458 ACCESSKEY="N"
459 >Next</A
460 ></TD
461 ></TR
462 ><TR
463 ><TD
464 WIDTH="33%"
465 ALIGN="left"
466 VALIGN="top"
467 >Starting <SPAN
468 CLASS="APPLICATION"
469 >Privoxy</SPAN
470 ></TD
471 ><TD
472 WIDTH="34%"
473 ALIGN="center"
474 VALIGN="top"
475 >&nbsp;</TD
476 ><TD
477 WIDTH="33%"
478 ALIGN="right"
479 VALIGN="top"
480 >The Main Configuration File</TD
481 ></TR
482 ></TABLE
483 ></DIV
484 ></BODY
485 ></HTML
486 >