generated
[privoxy.git] / doc / webserver / user-manual / startup.html
1 <HTML
2 ><HEAD
3 ><TITLE
4 >Starting Privoxy</TITLE
5 ><META
6 NAME="GENERATOR"
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.64
8 "><LINK
9 REL="HOME"
10 TITLE="Privoxy User Manual"
11 HREF="index.html"><LINK
12 REL="PREVIOUS"
13 TITLE="Quickstart to Using Privoxy"
14 HREF="quickstart.html"><LINK
15 REL="NEXT"
16 TITLE="Privoxy Configuration"
17 HREF="configuration.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 WIDTH="100%"
32 BORDER="0"
33 CELLPADDING="0"
34 CELLSPACING="0"
35 ><TR
36 ><TH
37 COLSPAN="3"
38 ALIGN="center"
39 >Privoxy User Manual</TH
40 ></TR
41 ><TR
42 ><TD
43 WIDTH="10%"
44 ALIGN="left"
45 VALIGN="bottom"
46 ><A
47 HREF="quickstart.html"
48 >Prev</A
49 ></TD
50 ><TD
51 WIDTH="80%"
52 ALIGN="center"
53 VALIGN="bottom"
54 ></TD
55 ><TD
56 WIDTH="10%"
57 ALIGN="right"
58 VALIGN="bottom"
59 ><A
60 HREF="configuration.html"
61 >Next</A
62 ></TD
63 ></TR
64 ></TABLE
65 ><HR
66 ALIGN="LEFT"
67 WIDTH="100%"></DIV
68 ><DIV
69 CLASS="SECT1"
70 ><H1
71 CLASS="SECT1"
72 ><A
73 NAME="STARTUP"
74 >6. Starting <SPAN
75 CLASS="APPLICATION"
76 >Privoxy</SPAN
77 ></A
78 ></H1
79 ><P
80 > Before launching <SPAN
81 CLASS="APPLICATION"
82 >Privoxy</SPAN
83 > for the first time, you 
84  will want to configure your browser(s) to use <SPAN
85 CLASS="APPLICATION"
86 >Privoxy</SPAN
87 >
88  as a HTTP and HTTPS proxy. The default is localhost for the proxy address,
89  and port 8118 (earlier versions used port 8000). This is the one
90  configuration step that must be done! </P
91 ><P
92
93  With <SPAN
94 CLASS="APPLICATION"
95 >Netscape</SPAN
96 > (and
97  <SPAN
98 CLASS="APPLICATION"
99 >Mozilla</SPAN
100 >), this can be set under <TT
101 CLASS="LITERAL"
102 >Edit
103  -&#62; Preferences -&#62; Advanced -&#62; Proxies -&#62; HTTP Proxy</TT
104 >.
105  For <SPAN
106 CLASS="APPLICATION"
107 >Internet Explorer</SPAN
108 >: <TT
109 CLASS="LITERAL"
110 >Tools -&#62;
111  Internet Properties -&#62; Connections -&#62; LAN Setting</TT
112 >. Then,
113  check <SPAN
114 CLASS="QUOTE"
115 >"Use Proxy"</SPAN
116 > and fill in the appropriate info (Address:
117  localhost, Port: 8118). Include if HTTPS proxy support too.</P
118 ><P
119 > After doing this, flush your browser's disk and memory caches to force a
120  re-reading of all pages and to get rid of any ads that may be cached. You 
121  are now ready to start enjoying the benefits of using
122  <SPAN
123 CLASS="APPLICATION"
124 >Privoxy</SPAN
125 >!</P
126 ><P
127 > <SPAN
128 CLASS="APPLICATION"
129 >Privoxy</SPAN
130 > is typically started by specifying the
131  main configuration file to be used on the command line. Example Unix startup
132  command:</P
133 ><P
134 > <TABLE
135 BORDER="0"
136 BGCOLOR="#E0E0E0"
137 WIDTH="100%"
138 ><TR
139 ><TD
140 ><PRE
141 CLASS="SCREEN"
142
143  # /usr/sbin/privoxy /etc/privoxy/config</PRE
144 ></TD
145 ></TR
146 ></TABLE
147 ></P
148 ><P
149 > See <A
150 HREF="startup.html#CMDOPTIONS"
151 >below</A
152 > for other command line options.</P
153 ><P
154 > An init script is provided for SuSE and Red Hat.</P
155 ><P
156 > For for SuSE: <B
157 CLASS="COMMAND"
158 >rcprivoxy start</B
159 ></P
160 ><P
161 > For Red Hat and Debian: <B
162 CLASS="COMMAND"
163 >/etc/rc.d/init.d/privoxy start</B
164 ></P
165 ><P
166 > If no configuration file is specified on the command line,
167  <SPAN
168 CLASS="APPLICATION"
169 >Privoxy</SPAN
170 > will look for a file named
171  <TT
172 CLASS="FILENAME"
173 >config</TT
174 > in the current directory. Except on Win32 where
175  it will try <TT
176 CLASS="FILENAME"
177 >config.txt</TT
178 >. If no file is specified on the
179  command line and no default configuration file can be found, 
180  <SPAN
181 CLASS="APPLICATION"
182 >Privoxy</SPAN
183 > will fail to start.</P
184 ><P
185 > The included default configuration files should give a reasonable starting
186  point. Most of the per site configuration is done in the
187  <SPAN
188 CLASS="QUOTE"
189 >"actions"</SPAN
190 > files. These are where various cookie actions are
191  defined, ad and banner blocking, and other aspects of
192  <SPAN
193 CLASS="APPLICATION"
194 >Privoxy</SPAN
195 > configuration. There are several such
196  files included, with varying levels of aggressiveness. </P
197 ><P
198 > You will probably want to keep an eye out for sites for which you may prefer
199  persistent cookies, and add these to your actions configuration as needed. By
200  default, most of these will be accepted only during the current browser
201  session (aka <SPAN
202 CLASS="QUOTE"
203 >"session cookies"</SPAN
204 >), unless you add them to the
205  configuration. If you want the browser to handle this instead, you will need
206  to edit <TT
207 CLASS="FILENAME"
208 >user.action</TT
209 > (or through the web based interface)
210  and disable this feature. If you use more than one browser, it would make
211  more sense to let <SPAN
212 CLASS="APPLICATION"
213 >Privoxy</SPAN
214 > handle this. In which
215  case, the browser(s) should be set to accept all cookies.</P
216 ><P
217 > Another feature where you will probably want to define exceptions for trusted
218  sites is the popup-killing (through the <TT
219 CLASS="LITERAL"
220 >+popup</TT
221 > and
222  <TT
223 CLASS="LITERAL"
224 >+filter{popups}</TT
225 > actions), because your favorite shopping,
226  banking, or leisure site may need popups (explained below). </P
227 ><P
228 > <SPAN
229 CLASS="APPLICATION"
230 >Privoxy</SPAN
231 > is HTTP/1.1 compliant,  but not all of
232  the optional 1.1 features are as yet supported. In the unlikely event that
233  you experience inexplicable problems with browsers that use HTTP/1.1 per default
234  (like <SPAN
235 CLASS="APPLICATION"
236 >Mozilla</SPAN
237 > or recent versions of I.E.), you might
238  try to force HTTP/1.0 compatibility. For Mozilla, look under <TT
239 CLASS="LITERAL"
240 >Edit -&#62;
241  Preferences -&#62; Debug -&#62; Networking</TT
242 >.
243  Alternatively, set the <SPAN
244 CLASS="QUOTE"
245 >"+downgrade-http-version"</SPAN
246 > config option in
247  <TT
248 CLASS="FILENAME"
249 >default.action</TT
250 > which will downgrade your browser's HTTP
251  requests from HTTP/1.1 to HTTP/1.0 before processing them.</P
252 ><P
253 > After running <SPAN
254 CLASS="APPLICATION"
255 >Privoxy</SPAN
256 > for a while, you can 
257  start to fine tune the configuration to suit your personal, or site, 
258  preferences and requirements. There are many, many aspects that can 
259  be customized. <SPAN
260 CLASS="QUOTE"
261 >"Actions"</SPAN
262
263  can be adjusted by pointing your browser to 
264  <A
265 HREF="http://config.privoxy.org/"
266 TARGET="_top"
267 >http://config.privoxy.org/</A
268 >
269  (shortcut: <A
270 HREF="http://p.p/"
271 TARGET="_top"
272 >http://p.p/</A
273 >), 
274  and then follow the link to <SPAN
275 CLASS="QUOTE"
276 >"View &#38; Change the Current Configuration"</SPAN
277 >. 
278  (This is an internal page and does not require Internet access.)</P
279 ><P
280 > In fact, various aspects of <SPAN
281 CLASS="APPLICATION"
282 >Privoxy</SPAN
283 >
284  configuration can be viewed from this page, including 
285  current configuration parameters, source code version numbers, 
286  the browser's request headers, and <SPAN
287 CLASS="QUOTE"
288 >"actions"</SPAN
289 > that apply 
290  to a given URL. In addition to the actions file 
291  editor mentioned above, <SPAN
292 CLASS="APPLICATION"
293 >Privoxy</SPAN
294 > can also 
295  be turned <SPAN
296 CLASS="QUOTE"
297 >"on"</SPAN
298 > and <SPAN
299 CLASS="QUOTE"
300 >"off"</SPAN
301 > (toggled) from this page.</P
302 ><P
303 > If you encounter problems, try loading the page without
304  <SPAN
305 CLASS="APPLICATION"
306 >Privoxy</SPAN
307 >. If that helps, enter the URL where
308  you have the problems into <A
309 HREF="http://p.p/show-url-info"
310 TARGET="_top"
311 >the browser
312  based rule tracing utility</A
313 >. See which rules apply and why, and
314  then try turning them off for that site one after the other, until the problem
315  is gone. When you have found the culprit, you might want to turn the rest on
316  again.</P
317 ><P
318 > If the above paragraph sounds gibberish to you, you might want to <A
319 HREF="configuration.html#ACTIONSFILE"
320 TARGET="_top"
321 >read more about the actions concept</A
322 >
323  or even dive deep into the <A
324 HREF="appendix.html#ACTIONSANAT"
325 TARGET="_top"
326 >Appendix
327  on actions</A
328 >.</P
329 ><P
330 > If you can't get rid of the problem at all, think you've found a bug in
331  Privoxy, want to propose a new feature or smarter rules, please see the 
332  section <A
333 HREF="contact.html"
334 TARGET="_top"
335 ><SPAN
336 CLASS="QUOTE"
337 >"Contacting the
338  Developers"</SPAN
339 ></A
340 > below. </P
341 ><DIV
342 CLASS="SECT2"
343 ><H2
344 CLASS="SECT2"
345 ><A
346 NAME="CMDOPTIONS"
347 >6.1. Command Line Options</A
348 ></H2
349 ><P
350 > <SPAN
351 CLASS="APPLICATION"
352 >Privoxy</SPAN
353 > may be invoked with the following
354  command-line options:</P
355 ><P
356 > <P
357 ></P
358 ><UL
359 ><LI
360 ><P
361 >    <I
362 CLASS="EMPHASIS"
363 >--version</I
364 >
365   </P
366 ><P
367 >     Print version info and exit. Unix only.
368   </P
369 ></LI
370 ><LI
371 ><P
372 >    <I
373 CLASS="EMPHASIS"
374 >--help</I
375 >
376   </P
377 ><P
378 >   Print short usage info and exit. Unix only.
379   </P
380 ></LI
381 ><LI
382 ><P
383 >   <I
384 CLASS="EMPHASIS"
385 >--no-daemon</I
386 >
387   </P
388 ><P
389 >   Don't become a daemon, i.e. don't fork and become process group
390    leader, and don't detach from controlling tty. Unix only.
391   </P
392 ></LI
393 ><LI
394 ><P
395 >   <I
396 CLASS="EMPHASIS"
397 >--pidfile FILE</I
398 >
399   
400   </P
401 ><P
402 >   On startup, write the process ID to <I
403 CLASS="EMPHASIS"
404 >FILE</I
405 >. Delete the
406    <I
407 CLASS="EMPHASIS"
408 >FILE</I
409 > on exit. Failure to create or delete the
410    <I
411 CLASS="EMPHASIS"
412 >FILE</I
413 > is non-fatal. If no <I
414 CLASS="EMPHASIS"
415 >FILE</I
416 >
417    option is given, no PID file will be used. Unix only.
418   </P
419 ></LI
420 ><LI
421 ><P
422 >   <I
423 CLASS="EMPHASIS"
424 >--user USER[.GROUP]</I
425 >
426   
427   </P
428 ><P
429 >   After (optionally) writing the PID file, assume the user  ID  of
430    <I
431 CLASS="EMPHASIS"
432 >USER</I
433 >, and if included the GID of GROUP.  Exit if the
434    privileges are not sufficient to do so. Unix only.
435   </P
436 ></LI
437 ><LI
438 ><P
439 >    <I
440 CLASS="EMPHASIS"
441 >configfile</I
442 >
443   </P
444 ><P
445 >    If no <I
446 CLASS="EMPHASIS"
447 >configfile</I
448 > is included on the command line, 
449     <SPAN
450 CLASS="APPLICATION"
451 >Privoxy</SPAN
452 > will look for a file named 
453     <SPAN
454 CLASS="QUOTE"
455 >"config"</SPAN
456 > in the current directory (except on Win32 
457     where it will look for <SPAN
458 CLASS="QUOTE"
459 >"config.txt"</SPAN
460 > instead). Specify 
461     full path to avoid confusion. If no config file is found, 
462     <SPAN
463 CLASS="APPLICATION"
464 >Privoxy</SPAN
465 > will fail to start.
466   </P
467 ></LI
468 ></UL
469 ></P
470 ></DIV
471 ></DIV
472 ><DIV
473 CLASS="NAVFOOTER"
474 ><HR
475 ALIGN="LEFT"
476 WIDTH="100%"><TABLE
477 WIDTH="100%"
478 BORDER="0"
479 CELLPADDING="0"
480 CELLSPACING="0"
481 ><TR
482 ><TD
483 WIDTH="33%"
484 ALIGN="left"
485 VALIGN="top"
486 ><A
487 HREF="quickstart.html"
488 >Prev</A
489 ></TD
490 ><TD
491 WIDTH="34%"
492 ALIGN="center"
493 VALIGN="top"
494 ><A
495 HREF="index.html"
496 >Home</A
497 ></TD
498 ><TD
499 WIDTH="33%"
500 ALIGN="right"
501 VALIGN="top"
502 ><A
503 HREF="configuration.html"
504 >Next</A
505 ></TD
506 ></TR
507 ><TR
508 ><TD
509 WIDTH="33%"
510 ALIGN="left"
511 VALIGN="top"
512 >Quickstart to Using <SPAN
513 CLASS="APPLICATION"
514 >Privoxy</SPAN
515 ></TD
516 ><TD
517 WIDTH="34%"
518 ALIGN="center"
519 VALIGN="top"
520 >&nbsp;</TD
521 ><TD
522 WIDTH="33%"
523 ALIGN="right"
524 VALIGN="top"
525 ><SPAN
526 CLASS="APPLICATION"
527 >Privoxy</SPAN
528 > Configuration</TD
529 ></TR
530 ></TABLE
531 ></DIV
532 ></BODY
533 ></HTML
534 >