afc3a4b1a2ba7b5c869f615a50e770e45d9b56de
[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.24 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.24 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="AEN627" id="AEN627"></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="AEN672" id="AEN672"></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-DEBIAN" id="START-DEBIAN">5.1.
141       Debian</a></h2>
142
143       <p>We use a script. Note that Debian typically starts <span class=
144       "APPLICATION">Privoxy</span> upon booting per default. It will use the
145       file <tt class="FILENAME">/etc/privoxy/config</tt> as its main
146       configuration file.</p>
147
148       <table border="0" bgcolor="#E0E0E0" width="100%">
149         <tr>
150           <td>
151             <pre class="SCREEN">
152  # /etc/init.d/privoxy start
153 </pre>
154           </td>
155         </tr>
156       </table>
157     </div>
158
159     <div class="SECT2">
160       <h2 class="SECT2"><a name="START-WINDOWS" id="START-WINDOWS">5.2.
161       Windows</a></h2>
162
163       <p>Click on the <span class="APPLICATION">Privoxy</span> Icon to start
164       <span class="APPLICATION">Privoxy</span>. If no configuration file is
165       specified on the command line, <span class="APPLICATION">Privoxy</span>
166       will look for a file named <tt class="FILENAME">config.txt</tt>. Note
167       that Windows will automatically start <span class=
168       "APPLICATION">Privoxy</span> when the system starts if you chose that
169       option when installing.</p>
170
171       <p><span class="APPLICATION">Privoxy</span> can run with full Windows
172       service functionality. On Windows only, the <span class=
173       "APPLICATION">Privoxy</span> program has two new command line arguments
174       to install and uninstall <span class="APPLICATION">Privoxy</span> as a
175       service. See the <a href=
176       "installation.html#INSTALLATION-PACK-WIN">Windows Installation
177       instructions</a> for details.</p>
178     </div>
179
180     <div class="SECT2">
181       <h2 class="SECT2"><a name="START-UNICES" id="START-UNICES">5.3.
182       Solaris, NetBSD, FreeBSD, HP-UX and others</a></h2>
183
184       <p>Example Unix startup command:</p>
185
186       <table border="0" bgcolor="#E0E0E0" width="100%">
187         <tr>
188           <td>
189             <pre class="SCREEN">
190  # /usr/sbin/privoxy /etc/privoxy/config
191 </pre>
192           </td>
193         </tr>
194       </table>
195     </div>
196
197     <div class="SECT2">
198       <h2 class="SECT2"><a name="START-OS2" id="START-OS2">5.4. OS/2</a></h2>
199
200       <p>During installation, <span class="APPLICATION">Privoxy</span> is
201       configured to start automatically when the system restarts. You can
202       start it manually by double-clicking on the <span class=
203       "APPLICATION">Privoxy</span> icon in the <span class=
204       "APPLICATION">Privoxy</span> folder.</p>
205     </div>
206
207     <div class="SECT2">
208       <h2 class="SECT2"><a name="START-MACOSX" id="START-MACOSX">5.5. Mac OS
209       X</a></h2>
210
211       <p>After downloading the privoxy software, unzip the downloaded file by
212       double-clicking on the zip file icon. Then, double-click on the
213       installer package icon and follow the installation process.</p>
214
215       <p>The privoxy service will automatically start after a successful
216       installation. In addition, the privoxy service will automatically start
217       every time your computer starts up.</p>
218
219       <p>To prevent the privoxy service from automatically starting when your
220       computer starts up, remove or rename the folder named
221       /Library/StartupItems/Privoxy.</p>
222
223       <p>A simple application named Privoxy Utility has been created which
224       enables administrators to easily start and stop the privoxy
225       service.</p>
226
227       <p>In addition, the Privoxy Utility presents a simple way for
228       administrators to edit the various privoxy config files. A method to
229       uninstall the software is also available.</p>
230
231       <p>An administrator username and password must be supplied in order for
232       the Privoxy Utility to perform any of the tasks.</p>
233     </div>
234
235     <div class="SECT2">
236       <h2 class="SECT2"><a name="CMDOPTIONS" id="CMDOPTIONS">5.6. Command
237       Line Options</a></h2>
238
239       <p><span class="APPLICATION">Privoxy</span> may be invoked with the
240       following command-line options:</p>
241
242       <ul>
243         <li>
244           <p><span class="emphasis"><i class=
245           "EMPHASIS">--config-test</i></span></p>
246
247           <p>Exit after loading the configuration files before binding to the
248           listen address. The exit code signals whether or not the
249           configuration files have been successfully loaded.</p>
250
251           <p>If the exit code is 1, at least one of the configuration files
252           is invalid, if it is 0, all the configuration files have been
253           successfully loaded (but may still contain errors that can
254           currently only be detected at run time).</p>
255
256           <p>This option doesn't affect the log setting, combination with
257           <span class="emphasis"><i class="EMPHASIS">--no-daemon</i></span>
258           is recommended if a configured log file shouldn't be used.</p>
259         </li>
260
261         <li>
262           <p><span class="emphasis"><i class=
263           "EMPHASIS">--version</i></span></p>
264
265           <p>Print version info and exit. Unix only.</p>
266         </li>
267
268         <li>
269           <p><span class="emphasis"><i class="EMPHASIS">--help</i></span></p>
270
271           <p>Print short usage info and exit. Unix only.</p>
272         </li>
273
274         <li>
275           <p><span class="emphasis"><i class=
276           "EMPHASIS">--no-daemon</i></span></p>
277
278           <p>Don't become a daemon, i.e. don't fork and become process group
279           leader, and don't detach from controlling tty. Unix only.</p>
280         </li>
281
282         <li>
283           <p><span class="emphasis"><i class="EMPHASIS">--pidfile
284           FILE</i></span></p>
285
286           <p>On startup, write the process ID to <span class=
287           "emphasis"><i class="EMPHASIS">FILE</i></span>. Delete the
288           <span class="emphasis"><i class="EMPHASIS">FILE</i></span> on exit.
289           Failure to create or delete the <span class="emphasis"><i class=
290           "EMPHASIS">FILE</i></span> is non-fatal. If no <span class=
291           "emphasis"><i class="EMPHASIS">FILE</i></span> option is given, no
292           PID file will be used. Unix only.</p>
293         </li>
294
295         <li>
296           <p><span class="emphasis"><i class="EMPHASIS">--user
297           USER[.GROUP]</i></span></p>
298
299           <p>After (optionally) writing the PID file, assume the user ID of
300           <span class="emphasis"><i class="EMPHASIS">USER</i></span>, and if
301           included the GID of GROUP. Exit if the privileges are not
302           sufficient to do so. Unix only.</p>
303         </li>
304
305         <li>
306           <p><span class="emphasis"><i class=
307           "EMPHASIS">--chroot</i></span></p>
308
309           <p>Before changing to the user ID given in the <span class=
310           "emphasis"><i class="EMPHASIS">--user</i></span> option, chroot to
311           that user's home directory, i.e. make the kernel pretend to the
312           <span class="APPLICATION">Privoxy</span> process that the directory
313           tree starts there. If set up carefully, this can limit the impact
314           of possible vulnerabilities in <span class=
315           "APPLICATION">Privoxy</span> to the files contained in that
316           hierarchy. Unix only.</p>
317         </li>
318
319         <li>
320           <p><span class="emphasis"><i class="EMPHASIS">--pre-chroot-nslookup
321           hostname</i></span></p>
322
323           <p>Specifies a hostname (for example www.privoxy.org) to look up
324           before doing a chroot. On some systems, initializing the resolver
325           library involves reading config files from /etc and/or loading
326           additional shared libraries from /lib. On these systems, doing a
327           hostname lookup before the chroot reduces the number of files that
328           must be copied into the chroot tree.</p>
329
330           <p>For fastest startup speed, a good value is a hostname that is
331           not in /etc/hosts but that your local name server (listed in
332           /etc/resolv.conf) can resolve without recursion (that is, without
333           having to ask any other name servers). The hostname need not exist,
334           but if it doesn't, an error message (which can be ignored) will be
335           output.</p>
336         </li>
337
338         <li>
339           <p><span class="emphasis"><i class=
340           "EMPHASIS">configfile</i></span></p>
341
342           <p>If no <span class="emphasis"><i class=
343           "EMPHASIS">configfile</i></span> is included on the command line,
344           <span class="APPLICATION">Privoxy</span> will look for a file named
345           <span class="QUOTE">"config"</span> in the current directory
346           (except on Win32 where it will look for <span class=
347           "QUOTE">"config.txt"</span> instead). Specify full path to avoid
348           confusion. If no config file is found, <span class=
349           "APPLICATION">Privoxy</span> will fail to start.</p>
350         </li>
351       </ul>
352
353       <p>On <span class="APPLICATION">MS Windows</span> only there are two
354       additional command-line options to allow <span class=
355       "APPLICATION">Privoxy</span> to install and run as a <span class=
356       "emphasis"><i class="EMPHASIS">service</i></span>. See the <a href=
357       "installation.html#INSTALLATION-PACK-WIN">Window Installation
358       section</a> for details.</p>
359     </div>
360   </div>
361
362   <div class="NAVFOOTER">
363     <hr align="left" width="100%">
364
365     <table summary="Footer navigation table" width="100%" border="0"
366     cellpadding="0" cellspacing="0">
367       <tr>
368         <td width="33%" align="left" valign="top"><a href="quickstart.html"
369         accesskey="P">Prev</a></td>
370
371         <td width="34%" align="center" valign="top"><a href="index.html"
372         accesskey="H">Home</a></td>
373
374         <td width="33%" align="right" valign="top"><a href=
375         "configuration.html" accesskey="N">Next</a></td>
376       </tr>
377
378       <tr>
379         <td width="33%" align="left" valign="top">Quickstart to Using
380         Privoxy</td>
381
382         <td width="34%" align="center" valign="top">&nbsp;</td>
383
384         <td width="33%" align="right" valign="top">Privoxy Configuration</td>
385       </tr>
386     </table>
387   </div>
388 </body>
389 </html>