Rebuild docs
[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 <html>
4 <head>
5   <title>Starting Privoxy</title>
6   <meta name="GENERATOR" content="Modular DocBook HTML Stylesheet Version 1.79">
7   <link rel="HOME" title="Privoxy 3.0.27 User Manual" href="index.html">
8   <link rel="PREVIOUS" title="Quickstart to Using Privoxy" href="quickstart.html">
9   <link rel="NEXT" title="Privoxy Configuration" href="configuration.html">
10   <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
11   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
12   <link rel="STYLESHEET" type="text/css" href="p_doc.css">
13 </head>
14 <body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink="#840084" alink="#0000FF">
15   <div class="NAVHEADER">
16     <table summary="Header navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
17       <tr>
18         <th colspan="3" align="center">Privoxy 3.0.27 User Manual</th>
19       </tr>
20       <tr>
21         <td width="10%" align="left" valign="bottom"><a href="quickstart.html" accesskey="P">Prev</a></td>
22         <td width="80%" align="center" valign="bottom"></td>
23         <td width="10%" align="right" valign="bottom"><a href="configuration.html" accesskey="N">Next</a></td>
24       </tr>
25     </table>
26     <hr align="left" width="100%">
27   </div>
28   <div class="SECT1">
29     <h1 class="SECT1"><a name="STARTUP" id="STARTUP">5. Starting Privoxy</a></h1>
30     <p>Before launching <span class="APPLICATION">Privoxy</span> for the first time, you will want to configure your
31     browser(s) to use <span class="APPLICATION">Privoxy</span> as a HTTP and HTTPS (SSL) <a href=
32     "http://en.wikipedia.org/wiki/Proxy_server" target="_top">proxy</a>. The default is 127.0.0.1 (or localhost) for
33     the proxy address, and port 8118 (earlier versions used port 8000). This is the one configuration step <span class=
34     "emphasis"><i class="EMPHASIS">that must be done</i></span>!</p>
35     <p>Please note that <span class="APPLICATION">Privoxy</span> can only proxy HTTP and HTTPS traffic. It will not
36     work with FTP or other protocols.</p>
37     <div class="FIGURE">
38       <a name="AEN725" id="AEN725"></a>
39       <p><b>Figure 2. Proxy Configuration Showing Mozilla/Netscape HTTP and HTTPS (SSL) Settings</b></p>
40       <div class="MEDIAOBJECT">
41         <p><img src="proxy_setup.jpg"></p>
42       </div>
43     </div>
44     <p>With <span class="APPLICATION">Firefox</span>, this is typically set under:</p>
45     <p class="LITERALLAYOUT">&nbsp;<span class="GUIBUTTON">Tools</span>&nbsp;-&#62;&nbsp;<span class=
46     "GUIBUTTON">Options</span>&nbsp;-&#62;&nbsp;&nbsp;<span class=
47     "GUIBUTTON">Advanced</span>&nbsp;-&#62;&nbsp;<span class="GUIBUTTON">Network</span>&nbsp;-&#62;<span class=
48     "GUIBUTTON">Connection</span>&nbsp;-&#62;&nbsp;<span class="GUIBUTTON">Settings</span></p>
49     <p>Or optionally on some platforms:</p>
50     <p class="LITERALLAYOUT">&nbsp;<span class="GUIBUTTON">Edit</span>&nbsp;-&#62;&nbsp;<span class=
51     "GUIBUTTON">Preferences</span>&nbsp;-&#62;&nbsp;<span class=
52     "GUIBUTTON">General</span>&nbsp;-&#62;&nbsp;<span class="GUIBUTTON">Connection
53     Settings</span>&nbsp;-&#62;&nbsp;<span class="GUIBUTTON">Manual Proxy Configuration</span></p>
54     <p>With <span class="APPLICATION">Netscape</span> (and <span class="APPLICATION">Mozilla</span>), this can be set
55     under:</p>
56     <p class="LITERALLAYOUT">&nbsp;<span class="GUIBUTTON">Edit</span>&nbsp;-&#62;&nbsp;<span class=
57     "GUIBUTTON">Preferences</span>&nbsp;-&#62;&nbsp;<span class=
58     "GUIBUTTON">Advanced</span>&nbsp;-&#62;&nbsp;<span class="GUIBUTTON">Proxies</span>&nbsp;-&#62;&nbsp;<span class=
59     "GUIBUTTON">HTTP Proxy</span></p>
60     <p>For <span class="APPLICATION">Internet Explorer v.5-7</span>:</p>
61     <p class="LITERALLAYOUT">&nbsp;<span class="GUIBUTTON">Tools</span>&nbsp;-&#62;&nbsp;<span class=
62     "GUIBUTTON">Internet Options</span>&nbsp;-&#62;&nbsp;<span class=
63     "GUIBUTTON">Connections</span>&nbsp;-&#62;&nbsp;<span class="GUIBUTTON">LAN Settings</span></p>
64     <p>Then, check <span class="QUOTE">"Use Proxy"</span> and fill in the appropriate info (Address: 127.0.0.1, Port:
65     8118). Include HTTPS (SSL), if you want HTTPS proxy support too (sometimes labeled <span class=
66     "QUOTE">"Secure"</span>). Make sure any checkboxes like <span class="QUOTE">"Use the same proxy server for all
67     protocols"</span> is <span class="emphasis"><i class="EMPHASIS">UNCHECKED</i></span>. You want only HTTP and HTTPS
68     (SSL)!</p>
69     <div class="FIGURE">
70       <a name="AEN769" id="AEN769"></a>
71       <p><b>Figure 3. Proxy Configuration Showing Internet Explorer HTTP and HTTPS (Secure) Settings</b></p>
72       <div class="MEDIAOBJECT">
73         <p><img src="proxy2.jpg"></p>
74       </div>
75     </div>
76     <p>After doing this, flush your browser's disk and memory caches to force a re-reading of all pages and to get rid
77     of any ads that may be cached. Remove any <a href="http://en.wikipedia.org/wiki/Browser_cookie" target=
78     "_top">cookies</a>, if you want <span class="APPLICATION">Privoxy</span> to manage that. You are now ready to start
79     enjoying the benefits of using <span class="APPLICATION">Privoxy</span>!</p>
80     <p><span class="APPLICATION">Privoxy</span> itself is typically started by specifying the main configuration file
81     to be used on the command line. If no configuration file is specified on the command line, <span class=
82     "APPLICATION">Privoxy</span> will look for a file named <tt class="FILENAME">config</tt> in the current directory.
83     Except on Win32 where it will try <tt class="FILENAME">config.txt</tt>.</p>
84     <div class="SECT2">
85       <h2 class="SECT2"><a name="START-DEBIAN" id="START-DEBIAN">5.1. Debian</a></h2>
86       <p>We use a script. Note that Debian typically starts <span class="APPLICATION">Privoxy</span> upon booting per
87       default. It will use the file <tt class="FILENAME">/etc/privoxy/config</tt> as its main configuration file.</p>
88       <table border="0" bgcolor="#E0E0E0" width="100%">
89         <tr>
90           <td>
91             <pre class="SCREEN"> # /etc/init.d/privoxy start</pre>
92           </td>
93         </tr>
94       </table>
95     </div>
96     <div class="SECT2">
97       <h2 class="SECT2"><a name="START-FREEBSD" id="START-FREEBSD">5.2. FreeBSD and ElectroBSD</a></h2>
98       <p>To start <span class="APPLICATION">Privoxy</span> upon booting, add "privoxy_enable='YES'" to <tt class=
99       "FILENAME">/etc/rc.conf</tt>. <span class="APPLICATION">Privoxy</span> will use <tt class=
100       "FILENAME">/usr/local/etc/privoxy/config</tt> as its main configuration file.</p>
101       <p>If you installed <span class="APPLICATION">Privoxy</span> into a jail, the paths above are relative to the
102       jail root.</p>
103       <p>To start <span class="APPLICATION">Privoxy</span> manually, run:</p>
104       <table border="0" bgcolor="#E0E0E0" width="100%">
105         <tr>
106           <td>
107             <pre class="SCREEN"> # service privoxy onestart</pre>
108           </td>
109         </tr>
110       </table>
111     </div>
112     <div class="SECT2">
113       <h2 class="SECT2"><a name="START-WINDOWS" id="START-WINDOWS">5.3. Windows</a></h2>
114       <p>Click on the <span class="APPLICATION">Privoxy</span> Icon to start <span class="APPLICATION">Privoxy</span>.
115       If no configuration file is specified on the command line, <span class="APPLICATION">Privoxy</span> will look for
116       a file named <tt class="FILENAME">config.txt</tt>. Note that Windows will automatically start <span class=
117       "APPLICATION">Privoxy</span> when the system starts if you chose that option when installing.</p>
118       <p><span class="APPLICATION">Privoxy</span> can run with full Windows service functionality. On Windows only, the
119       <span class="APPLICATION">Privoxy</span> program has two new command line arguments to install and uninstall
120       <span class="APPLICATION">Privoxy</span> as a service. See the <a href=
121       "installation.html#INSTALLATION-PACK-WIN">Windows Installation instructions</a> for details.</p>
122     </div>
123     <div class="SECT2">
124       <h2 class="SECT2"><a name="START-UNICES" id="START-UNICES">5.4. Generic instructions for Unix derivates (Solaris,
125       NetBSD, HP-UX etc.)</a></h2>
126       <p>Example Unix startup command:</p>
127       <table border="0" bgcolor="#E0E0E0" width="100%">
128         <tr>
129           <td>
130             <pre class="SCREEN"> # /usr/sbin/privoxy --user privoxy /etc/privoxy/config</pre>
131           </td>
132         </tr>
133       </table>
134       <p>Note that if you installed <span class="APPLICATION">Privoxy</span> through a package manager, the package
135       will probably contain a platform-specific script or configuration file to start <span class=
136       "APPLICATION">Privoxy</span> upon boot.</p>
137     </div>
138     <div class="SECT2">
139       <h2 class="SECT2"><a name="START-OS2" id="START-OS2">5.5. OS/2</a></h2>
140       <p>During installation, <span class="APPLICATION">Privoxy</span> is configured to start automatically when the
141       system restarts. You can start it manually by double-clicking on the <span class="APPLICATION">Privoxy</span>
142       icon in the <span class="APPLICATION">Privoxy</span> folder.</p>
143     </div>
144     <div class="SECT2">
145       <h2 class="SECT2"><a name="START-MACOSX" id="START-MACOSX">5.6. Mac OS X</a></h2>
146       <p>The privoxy service will automatically start after a successful installation (and thereafter every time your
147       computer starts up) however you will need to configure your web browser(s) to use it. To do so, configure them to
148       use a proxy for HTTP and HTTPS at the address 127.0.0.1:8118.</p>
149       <p>To prevent the privoxy service from automatically starting when your computer starts up, remove or rename the
150       file <tt class="LITERAL">/Library/LaunchDaemons/org.ijbswa.privoxy.plist</tt> (on OS X 10.5 and higher) or the
151       folder named <tt class="LITERAL">/Library/StartupItems/Privoxy</tt> (on OS X 10.4 'Tiger').</p>
152       <p>To manually start or stop the privoxy service, use the scripts startPrivoxy.sh and stopPrivoxy.sh supplied in
153       /Applications/Privoxy. They must be run from an administrator account, using sudo.</p>
154     </div>
155     <div class="SECT2">
156       <h2 class="SECT2"><a name="CMDOPTIONS" id="CMDOPTIONS">5.7. Command Line Options</a></h2>
157       <p><span class="APPLICATION">Privoxy</span> may be invoked with the following command-line options:</p>
158       <ul>
159         <li>
160           <p><span class="emphasis"><i class="EMPHASIS">--config-test</i></span></p>
161           <p>Exit after loading the configuration files before binding to the listen address. The exit code signals
162           whether or not the configuration files have been successfully loaded.</p>
163           <p>If the exit code is 1, at least one of the configuration files is invalid, if it is 0, all the
164           configuration files have been successfully loaded (but may still contain errors that can currently only be
165           detected at run time).</p>
166           <p>This option doesn't affect the log setting, combination with <span class="emphasis"><i class=
167           "EMPHASIS">--no-daemon</i></span> is recommended if a configured log file shouldn't be used.</p>
168         </li>
169         <li>
170           <p><span class="emphasis"><i class="EMPHASIS">--version</i></span></p>
171           <p>Print version info and exit. Unix only.</p>
172         </li>
173         <li>
174           <p><span class="emphasis"><i class="EMPHASIS">--help</i></span></p>
175           <p>Print short usage info and exit. Unix only.</p>
176         </li>
177         <li>
178           <p><span class="emphasis"><i class="EMPHASIS">--no-daemon</i></span></p>
179           <p>Don't become a daemon, i.e. don't fork and become process group leader, and don't detach from controlling
180           tty. Unix only.</p>
181         </li>
182         <li>
183           <p><span class="emphasis"><i class="EMPHASIS">--pidfile FILE</i></span></p>
184           <p>On startup, write the process ID to <span class="emphasis"><i class="EMPHASIS">FILE</i></span>. Delete the
185           <span class="emphasis"><i class="EMPHASIS">FILE</i></span> on exit. Failure to create or delete the
186           <span class="emphasis"><i class="EMPHASIS">FILE</i></span> is non-fatal. If no <span class=
187           "emphasis"><i class="EMPHASIS">FILE</i></span> option is given, no PID file will be used. Unix only.</p>
188         </li>
189         <li>
190           <p><span class="emphasis"><i class="EMPHASIS">--user USER[.GROUP]</i></span></p>
191           <p>After (optionally) writing the PID file, assume the user ID of <span class="emphasis"><i class=
192           "EMPHASIS">USER</i></span>, and if included the GID of GROUP. Exit if the privileges are not sufficient to do
193           so. Unix only.</p>
194         </li>
195         <li>
196           <p><span class="emphasis"><i class="EMPHASIS">--chroot</i></span></p>
197           <p>Before changing to the user ID given in the <span class="emphasis"><i class="EMPHASIS">--user</i></span>
198           option, chroot to that user's home directory, i.e. make the kernel pretend to the <span class=
199           "APPLICATION">Privoxy</span> process that the directory tree starts there. If set up carefully, this can
200           limit the impact of possible vulnerabilities in <span class="APPLICATION">Privoxy</span> to the files
201           contained in that hierarchy. Unix only.</p>
202         </li>
203         <li>
204           <p><span class="emphasis"><i class="EMPHASIS">--pre-chroot-nslookup hostname</i></span></p>
205           <p>Specifies a hostname (for example www.privoxy.org) to look up before doing a chroot. On some systems,
206           initializing the resolver library involves reading config files from /etc and/or loading additional shared
207           libraries from /lib. On these systems, doing a hostname lookup before the chroot reduces the number of files
208           that must be copied into the chroot tree.</p>
209           <p>For fastest startup speed, a good value is a hostname that is not in /etc/hosts but that your local name
210           server (listed in /etc/resolv.conf) can resolve without recursion (that is, without having to ask any other
211           name servers). The hostname need not exist, but if it doesn't, an error message (which can be ignored) will
212           be output.</p>
213         </li>
214         <li>
215           <p><span class="emphasis"><i class="EMPHASIS">configfile</i></span></p>
216           <p>If no <span class="emphasis"><i class="EMPHASIS">configfile</i></span> is included on the command line,
217           <span class="APPLICATION">Privoxy</span> will look for a file named <span class="QUOTE">"config"</span> in
218           the current directory (except on Win32 where it will look for <span class="QUOTE">"config.txt"</span>
219           instead). Specify full path to avoid confusion. If no config file is found, <span class=
220           "APPLICATION">Privoxy</span> will fail to start.</p>
221         </li>
222       </ul>
223       <p>On <span class="APPLICATION">MS Windows</span> only there are two additional command-line options to allow
224       <span class="APPLICATION">Privoxy</span> to install and run as a <span class="emphasis"><i class=
225       "EMPHASIS">service</i></span>. See the <a href="installation.html#INSTALLATION-PACK-WIN">Window Installation
226       section</a> for details.</p>
227     </div>
228   </div>
229   <div class="NAVFOOTER">
230     <hr align="left" width="100%">
231     <table summary="Footer navigation table" width="100%" border="0" cellpadding="0" cellspacing="0">
232       <tr>
233         <td width="33%" align="left" valign="top"><a href="quickstart.html" accesskey="P">Prev</a></td>
234         <td width="34%" align="center" valign="top"><a href="index.html" accesskey="H">Home</a></td>
235         <td width="33%" align="right" valign="top"><a href="configuration.html" accesskey="N">Next</a></td>
236       </tr>
237       <tr>
238         <td width="33%" align="left" valign="top">Quickstart to Using Privoxy</td>
239         <td width="34%" align="center" valign="top">&nbsp;</td>
240         <td width="33%" align="right" valign="top">Privoxy Configuration</td>
241       </tr>
242     </table>
243   </div>
244 </body>
245 </html>