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