Rebuild for 3.0.19 stable
[privoxy.git] / doc / webserver / user-manual / startup.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
3
4 <html>
5 <head>
6   <meta name="generator" content=
7   "HTML Tidy for Linux/x86 (vers 7 December 2008), see www.w3.org">
8
9   <title>Starting Privoxy</title>
10   <meta name="GENERATOR" content=
11   "Modular DocBook HTML Stylesheet Version 1.79">
12   <link rel="HOME" title="Privoxy 3.0.19 User Manual" href="index.html">
13   <link rel="PREVIOUS" title="Quickstart to Using Privoxy" href=
14   "quickstart.html">
15   <link rel="NEXT" title="Privoxy Configuration" href="configuration.html">
16   <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
17   <meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
18   <link rel="STYLESHEET" type="text/css" href="p_doc.css">
19   <style type="text/css">
20 body {
21   background-color: #EEEEEE;
22   color: #000000;
23   }
24   :link { color: #0000FF }
25   :visited { color: #840084 }
26   :active { color: #0000FF }
27   table.c4 {background-color: #E0E0E0}
28   p.c3 {font-weight: bold}
29   span.c2 {font-style: italic}
30   hr.c1 {text-align: left}
31   </style>
32 </head>
33
34 <body class="SECT1">
35   <div class="NAVHEADER">
36     <table summary="Header navigation table" width="100%" border="0"
37     cellpadding="0" cellspacing="0">
38       <tr>
39         <th colspan="3" align="center">Privoxy 3.0.19 User Manual</th>
40       </tr>
41
42       <tr>
43         <td width="10%" align="left" valign="bottom"><a href=
44         "quickstart.html" accesskey="P">Prev</a></td>
45
46         <td width="80%" align="center" valign="bottom"></td>
47
48         <td width="10%" align="right" valign="bottom"><a href=
49         "configuration.html" accesskey="N">Next</a></td>
50       </tr>
51     </table>
52     <hr class="c1" width="100%">
53   </div>
54
55   <div class="SECT1">
56     <h1 class="SECT1"><a name="STARTUP" id="STARTUP">5. Starting
57     Privoxy</a></h1>
58
59     <p>Before launching <span class="APPLICATION">Privoxy</span> for the
60     first time, you will want to configure your browser(s) to use
61     <span class="APPLICATION">Privoxy</span> as a HTTP and HTTPS (SSL)
62     <a href="http://en.wikipedia.org/wiki/Proxy_server" target=
63     "_top">proxy</a>. The default is 127.0.0.1 (or localhost) for the proxy
64     address, and port 8118 (earlier versions used port 8000). This is the one
65     configuration step <span class="emphasis EMPHASIS c2">that must be
66     done</span>!</p>
67
68     <p>Please note that <span class="APPLICATION">Privoxy</span> can only
69     proxy HTTP and HTTPS traffic. It will not work with FTP or other
70     protocols.</p>
71
72     <div class="FIGURE">
73       <a name="AEN899" id="AEN899"></a>
74
75       <p class="c3">Figure 2. Proxy Configuration Showing Mozilla/Netscape
76       HTTP and HTTPS (SSL) Settings</p>
77
78       <div class="MEDIAOBJECT">
79         <p><img src="proxy_setup.jpg"></p>
80       </div>
81     </div>
82
83     <p>With <span class="APPLICATION">Firefox</span>, this is typically set
84     under:</p>
85
86     <p class="LITERALLAYOUT">&nbsp;<span class=
87     "GUIBUTTON">Tools</span>&nbsp;-&gt;&nbsp;<span class=
88     "GUIBUTTON">Options</span>&nbsp;-&gt;&nbsp;&nbsp;<span class=
89     "GUIBUTTON">Advanced</span>&nbsp;-&gt;&nbsp;<span class=
90     "GUIBUTTON">Network</span>&nbsp;-&gt;<span class=
91     "GUIBUTTON">Connection</span>&nbsp;-&gt;&nbsp;<span class=
92     "GUIBUTTON">Settings</span><br></p>
93
94     <p>Or optionally on some platforms:</p>
95
96     <p class="LITERALLAYOUT">&nbsp;<span class=
97     "GUIBUTTON">Edit</span>&nbsp;-&gt;&nbsp;<span class=
98     "GUIBUTTON">Preferences</span>&nbsp;-&gt;&nbsp;<span class=
99     "GUIBUTTON">General</span>&nbsp;-&gt;&nbsp;<span class=
100     "GUIBUTTON">Connection Settings</span>&nbsp;-&gt;&nbsp;<span class=
101     "GUIBUTTON">Manual Proxy Configuration</span><br></p>
102
103     <p>With <span class="APPLICATION">Netscape</span> (and <span class=
104     "APPLICATION">Mozilla</span>), this can be set under:</p>
105
106     <p class="LITERALLAYOUT">&nbsp;<span class=
107     "GUIBUTTON">Edit</span>&nbsp;-&gt;&nbsp;<span class=
108     "GUIBUTTON">Preferences</span>&nbsp;-&gt;&nbsp;<span class=
109     "GUIBUTTON">Advanced</span>&nbsp;-&gt;&nbsp;<span class=
110     "GUIBUTTON">Proxies</span>&nbsp;-&gt;&nbsp;<span class="GUIBUTTON">HTTP
111     Proxy</span><br></p>
112
113     <p>For <span class="APPLICATION">Internet Explorer v.5-7</span>:</p>
114
115     <p class="LITERALLAYOUT">&nbsp;<span class=
116     "GUIBUTTON">Tools</span>&nbsp;-&gt;&nbsp;<span class="GUIBUTTON">Internet
117     Options</span>&nbsp;-&gt;&nbsp;<span class=
118     "GUIBUTTON">Connections</span>&nbsp;-&gt;&nbsp;<span class=
119     "GUIBUTTON">LAN Settings</span></p>
120
121     <p>Then, check <span class="QUOTE">"Use Proxy"</span> and fill in the
122     appropriate info (Address: 127.0.0.1, Port: 8118). Include HTTPS (SSL),
123     if you want HTTPS proxy support too (sometimes labeled <span class=
124     "QUOTE">"Secure"</span>). Make sure any checkboxes like <span class=
125     "QUOTE">"Use the same proxy server for all protocols"</span> is
126     <span class="emphasis EMPHASIS c2">UNCHECKED</span>. You want only HTTP
127     and HTTPS (SSL)!</p>
128
129     <div class="FIGURE">
130       <a name="AEN944" id="AEN944"></a>
131
132       <p class="c3">Figure 3. Proxy Configuration Showing Internet Explorer
133       HTTP and HTTPS (Secure) Settings</p>
134
135       <div class="MEDIAOBJECT">
136         <p><img src="proxy2.jpg"></p>
137       </div>
138     </div>
139
140     <p>After doing this, flush your browser's disk and memory caches to force
141     a re-reading of all pages and to get rid of any ads that may be cached.
142     Remove any <a href="http://en.wikipedia.org/wiki/Browser_cookie" target=
143     "_top">cookies</a>, if you want <span class="APPLICATION">Privoxy</span>
144     to manage that. You are now ready to start enjoying the benefits of using
145     <span class="APPLICATION">Privoxy</span>!</p>
146
147     <p><span class="APPLICATION">Privoxy</span> itself is typically started
148     by specifying the main configuration file to be used on the command line.
149     If no configuration file is specified on the command line, <span class=
150     "APPLICATION">Privoxy</span> will look for a file named <tt class=
151     "FILENAME">config</tt> in the current directory. Except on Win32 where it
152     will try <tt class="FILENAME">config.txt</tt>.</p>
153
154     <div class="SECT2">
155       <h2 class="SECT2"><a name="START-REDHAT" id="START-REDHAT">5.1. Red Hat
156       and Fedora</a></h2>
157
158       <p>A default Red Hat installation may not start <span class=
159       "APPLICATION">Privoxy</span> upon boot. It will use the file <tt class=
160       "FILENAME">/etc/privoxy/config</tt> as its main configuration file.</p>
161
162       <table class="c4" border="0" width="100%">
163         <tr>
164           <td>
165             <pre class="SCREEN">
166  # /etc/rc.d/init.d/privoxy start
167 </pre>
168           </td>
169         </tr>
170       </table>
171
172       <p>Or ...</p>
173
174       <table class="c4" border="0" width="100%">
175         <tr>
176           <td>
177             <pre class="SCREEN">
178  # service privoxy start
179 </pre>
180           </td>
181         </tr>
182       </table>
183     </div>
184
185     <div class="SECT2">
186       <h2 class="SECT2"><a name="START-DEBIAN" id="START-DEBIAN">5.2.
187       Debian</a></h2>
188
189       <p>We use a script. Note that Debian typically starts <span class=
190       "APPLICATION">Privoxy</span> upon booting per default. It will use the
191       file <tt class="FILENAME">/etc/privoxy/config</tt> as its main
192       configuration file.</p>
193
194       <table class="c4" border="0" width="100%">
195         <tr>
196           <td>
197             <pre class="SCREEN">
198  # /etc/init.d/privoxy start
199 </pre>
200           </td>
201         </tr>
202       </table>
203     </div>
204
205     <div class="SECT2">
206       <h2 class="SECT2"><a name="START-WINDOWS" id="START-WINDOWS">5.3.
207       Windows</a></h2>
208
209       <p>Click on the <span class="APPLICATION">Privoxy</span> Icon to start
210       <span class="APPLICATION">Privoxy</span>. If no configuration file is
211       specified on the command line, <span class="APPLICATION">Privoxy</span>
212       will look for a file named <tt class="FILENAME">config.txt</tt>. Note
213       that Windows will automatically start <span class=
214       "APPLICATION">Privoxy</span> when the system starts if you chose that
215       option when installing.</p>
216
217       <p><span class="APPLICATION">Privoxy</span> can run with full Windows
218       service functionality. On Windows only, the <span class=
219       "APPLICATION">Privoxy</span> program has two new command line arguments
220       to install and uninstall <span class="APPLICATION">Privoxy</span> as a
221       service. See the <a href=
222       "installation.html#INSTALLATION-PACK-WIN">Windows Installation
223       instructions</a> for details.</p>
224     </div>
225
226     <div class="SECT2">
227       <h2 class="SECT2"><a name="START-UNICES" id="START-UNICES">5.4.
228       Solaris, NetBSD, FreeBSD, HP-UX and others</a></h2>
229
230       <p>Example Unix startup command:</p>
231
232       <table class="c4" border="0" width="100%">
233         <tr>
234           <td>
235             <pre class="SCREEN">
236  # /usr/sbin/privoxy /etc/privoxy/config
237 </pre>
238           </td>
239         </tr>
240       </table>
241     </div>
242
243     <div class="SECT2">
244       <h2 class="SECT2"><a name="START-OS2" id="START-OS2">5.5. OS/2</a></h2>
245
246       <p>During installation, <span class="APPLICATION">Privoxy</span> is
247       configured to start automatically when the system restarts. You can
248       start it manually by double-clicking on the <span class=
249       "APPLICATION">Privoxy</span> icon in the <span class=
250       "APPLICATION">Privoxy</span> folder.</p>
251     </div>
252
253     <div class="SECT2">
254       <h2 class="SECT2"><a name="START-MACOSX" id="START-MACOSX">5.6. Mac OS
255       X</a></h2>
256
257       <p>After downloading the privoxy software, unzip the downloaded file by
258       double-clicking on the zip file icon. Then, double-click on the
259       installer package icon and follow the installation process.</p>
260
261       <p>The privoxy service will automatically start after a successful
262       installation. In addition, the privoxy service will automatically start
263       every time your computer starts up.</p>
264
265       <p>To prevent the privoxy service from automatically starting when your
266       computer starts up, remove or rename the folder named
267       /Library/StartupItems/Privoxy.</p>
268
269       <p>A simple application named Privoxy Utility has been created which
270       enables administrators to easily start and stop the privoxy
271       service.</p>
272
273       <p>In addition, the Privoxy Utility presents a simple way for
274       administrators to edit the various privoxy config files. A method to
275       uninstall the software is also available.</p>
276
277       <p>An administrator username and password must be supplied in order for
278       the Privoxy Utility to perform any of the tasks.</p>
279     </div>
280
281     <div class="SECT2">
282       <h2 class="SECT2"><a name="START-AMIGAOS" id="START-AMIGAOS">5.7.
283       AmigaOS</a></h2>
284
285       <p>Start <span class="APPLICATION">Privoxy</span> (with RUN
286       &lt;&gt;NIL:) in your <tt class="FILENAME">startnet</tt> script
287       (AmiTCP), in <tt class="FILENAME">s:user-startup</tt> (RoadShow), as
288       startup program in your startup script (Genesis), or as startup action
289       (Miami and MiamiDx). <span class="APPLICATION">Privoxy</span> will
290       automatically quit when you quit your TCP/IP stack (just ignore the
291       harmless warning your TCP/IP stack may display that <span class=
292       "APPLICATION">Privoxy</span> is still running).</p>
293     </div>
294
295     <div class="SECT2">
296       <h2 class="SECT2"><a name="START-GENTOO" id="START-GENTOO">5.8.
297       Gentoo</a></h2>
298
299       <p>A script is again used. It will use the file <tt class=
300       "FILENAME">/etc/privoxy/config</tt> as its main configuration file.</p>
301
302       <table class="c4" border="0" width="100%">
303         <tr>
304           <td>
305             <pre class="SCREEN">
306  /etc/init.d/privoxy start
307
308 </pre>
309           </td>
310         </tr>
311       </table>
312
313       <p>Note that <span class="APPLICATION">Privoxy</span> is not
314       automatically started at boot time by default. You can change this with
315       the <tt class="LITERAL">rc-update</tt> command.</p>
316
317       <table class="c4" border="0" width="100%">
318         <tr>
319           <td>
320             <pre class="SCREEN">
321  rc-update add privoxy default
322
323 </pre>
324           </td>
325         </tr>
326       </table>
327     </div>
328
329     <div class="SECT2">
330       <h2 class="SECT2"><a name="CMDOPTIONS" id="CMDOPTIONS">5.9. Command
331       Line Options</a></h2>
332
333       <p><span class="APPLICATION">Privoxy</span> may be invoked with the
334       following command-line options:</p>
335
336       <ul>
337         <li>
338           <p><span class="emphasis EMPHASIS c2">--version</span></p>
339
340           <p>Print version info and exit. Unix only.</p>
341         </li>
342
343         <li>
344           <p><span class="emphasis EMPHASIS c2">--help</span></p>
345
346           <p>Print short usage info and exit. Unix only.</p>
347         </li>
348
349         <li>
350           <p><span class="emphasis EMPHASIS c2">--no-daemon</span></p>
351
352           <p>Don't become a daemon, i.e. don't fork and become process group
353           leader, and don't detach from controlling tty. Unix only.</p>
354         </li>
355
356         <li>
357           <p><span class="emphasis EMPHASIS c2">--pidfile FILE</span></p>
358
359           <p>On startup, write the process ID to <span class=
360           "emphasis EMPHASIS c2">FILE</span>. Delete the <span class=
361           "emphasis EMPHASIS c2">FILE</span> on exit. Failure to create or
362           delete the <span class="emphasis EMPHASIS c2">FILE</span> is
363           non-fatal. If no <span class="emphasis EMPHASIS c2">FILE</span>
364           option is given, no PID file will be used. Unix only.</p>
365         </li>
366
367         <li>
368           <p><span class="emphasis EMPHASIS c2">--user
369           USER[.GROUP]</span></p>
370
371           <p>After (optionally) writing the PID file, assume the user ID of
372           <span class="emphasis EMPHASIS c2">USER</span>, and if included the
373           GID of GROUP. Exit if the privileges are not sufficient to do so.
374           Unix only.</p>
375         </li>
376
377         <li>
378           <p><span class="emphasis EMPHASIS c2">--chroot</span></p>
379
380           <p>Before changing to the user ID given in the <span class=
381           "emphasis EMPHASIS c2">--user</span> option, chroot to that user's
382           home directory, i.e. make the kernel pretend to the <span class=
383           "APPLICATION">Privoxy</span> process that the directory tree starts
384           there. If set up carefully, this can limit the impact of possible
385           vulnerabilities in <span class="APPLICATION">Privoxy</span> to the
386           files contained in that hierarchy. Unix only.</p>
387         </li>
388
389         <li>
390           <p><span class="emphasis EMPHASIS c2">--pre-chroot-nslookup
391           hostname</span></p>
392
393           <p>Specifies a hostname to look up before doing a chroot. On some
394           systems, initializing the resolver library involves reading config
395           files from /etc and/or loading additional shared libraries from
396           /lib. On these systems, doing a hostname lookup before the chroot
397           reduces the number of files that must be copied into the chroot
398           tree.</p>
399
400           <p>For fastest startup speed, a good value is a hostname that is
401           not in /etc/hosts but that your local name server (listed in
402           /etc/resolv.conf) can resolve without recursion (that is, without
403           having to ask any other name servers). The hostname need not exist,
404           but if it doesn't, an error message (which can be ignored) will be
405           output.</p>
406         </li>
407
408         <li>
409           <p><span class="emphasis EMPHASIS c2">configfile</span></p>
410
411           <p>If no <span class="emphasis EMPHASIS c2">configfile</span> is
412           included on the command line, <span class=
413           "APPLICATION">Privoxy</span> will look for a file named
414           <span class="QUOTE">"config"</span> in the current directory
415           (except on Win32 where it will look for <span class=
416           "QUOTE">"config.txt"</span> instead). Specify full path to avoid
417           confusion. If no config file is found, <span class=
418           "APPLICATION">Privoxy</span> will fail to start.</p>
419         </li>
420       </ul>
421
422       <p>On <span class="APPLICATION">MS Windows</span> only there are two
423       additional command-line options to allow <span class=
424       "APPLICATION">Privoxy</span> to install and run as a <span class=
425       "emphasis EMPHASIS c2">service</span>. See the <a href=
426       "installation.html#INSTALLATION-PACK-WIN">Window Installation
427       section</a> for details.</p>
428     </div>
429   </div>
430
431   <div class="NAVFOOTER">
432     <hr class="c1" width="100%">
433
434     <table summary="Footer navigation table" width="100%" border="0"
435     cellpadding="0" cellspacing="0">
436       <tr>
437         <td width="33%" align="left" valign="top"><a href="quickstart.html"
438         accesskey="P">Prev</a></td>
439
440         <td width="34%" align="center" valign="top"><a href="index.html"
441         accesskey="H">Home</a></td>
442
443         <td width="33%" align="right" valign="top"><a href=
444         "configuration.html" accesskey="N">Next</a></td>
445       </tr>
446
447       <tr>
448         <td width="33%" align="left" valign="top">Quickstart to Using
449         Privoxy</td>
450
451         <td width="34%" align="center" valign="top">&nbsp;</td>
452
453         <td width="33%" align="right" valign="top">Privoxy Configuration</td>
454       </tr>
455     </table>
456   </div>
457 </body>
458 </html>