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