283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
|
<p>This will back out the changes that the merge or update made to the
working checkout. There is also a [/help/redo|redo] command if you undo by
mistake. Undo and redo only work for changes that have
not yet been checked in using commit and there is only a single
level of undo/redo.</p>
<a name="serversetup"></a>
<h2>Setting Up A Server</h2>
<p>The easiest way to set up a server is:</p>
<blockquote>
<b>[/help/server | fossil server]</b> <i>repository-filename</i>
</blockquote>
<p>Or</b>
<blockquote>
<b>[/help/ui | fossil ui]</b> <i>repository-filename</i>
</blockquote>
<p>The <b>ui</b> command is intended for accessing the web interface
from a local desktop. The <b>ui</b> command binds to the loopback IP
address only (and thus makes the web interface visible only on the
local machine) and it automatically start your web browser pointing at the
server. For cross-machine collaboration, use the <b>server</b> command,
which binds on all IP addresses and does not try to start a web browser.
You can omit the <i>repository-filename</i> if you are within
a checked-out local tree. The <b>server</b> uses port 8080 by default
but you can specify a different port using the <b>-port</b> option.</p>
<p>The same commands can be used with the --scgi option to run
[./scgi.wiki | SCGI] from Nginx, if desired.</p>
<p>Command-line servers like this are useful when two people want
to share a repository on temporary or ad-hoc basis. For a more
permanent installation, you should use either the CGI server or the
inetd server.
<a name="cgiserver"></a>
To use the CGI server, create a CGI script that
looks something like this:</p>
<blockquote><b>
#!/usr/local/bin/fossil<br>
repository: /home/proj1/repos1.fossil
</b></blockquote>
<p>Adjust the paths in this CGI script to match your installation
and make sure both repository file and the directory that contains it
are readable and writable by the user that CGI scripts run as.
Then point clients at the CGI script. That's all there is to it!</p>
<a name="inetdserver"></a>
<p>You can also run fossil from inetd or xinetd. For an inetd
installation, make an entry in /etc/inetd.conf that looks something
like this:</p>
<blockquote><b>
80 stream tcp nowait.1000 root /usr/bin/fossil \<br>
/usr/bin/fossil http /home/proj1/repos1.fossil
</b></blockquote>
<p>Adjust the paths to suit your installation, of course. Notice that
fossil runs as root. This is not required - you can run it as an
unprivileged user. But it is more secure to run fossil as root.
When you do run fossil as root, it automatically puts itself in a
chroot jail in the same directory as the repository, then drops
root privileges prior to reading any information from the socket.</p>
<a name="proxy"></a>
<h2>HTTP Proxies</h2>
<p>If you are behind a restrictive firewall that requires you to use
an HTTP proxy to reach the internet, then you can configure the proxy
in three different ways. You can tell fossil about your proxy using
|
<
>
|
|
>
<
<
<
|
>
|
|
<
<
<
<
<
|
<
<
<
<
<
<
<
|
<
<
<
<
|
<
<
<
<
|
|
<
<
|
<
<
|
<
|
<
<
<
<
<
<
|
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
|
<p>This will back out the changes that the merge or update made to the
working checkout. There is also a [/help/redo|redo] command if you undo by
mistake. Undo and redo only work for changes that have
not yet been checked in using commit and there is only a single
level of undo/redo.</p>
<h2>Setting Up A Server</h2>
<p>Fossil can act as a stand-alone web server using one of these
commands:</p>
<blockquote>
<b>[/help/server | fossil server]</b> <i>repository-filename</i><br>
<b>[/help/ui | fossil ui]</b> <i>repository-filename</i>
</blockquote>
<p>The <i>repository-filename</i> can be omitted when these commands
are run from within an open check-out, which a particularly useful
shortcut for the <b>fossil ui</b> command.
<p>The <b>ui</b> command is intended for accessing the web interface
from a local desktop. The <b>ui</b> command binds to the loopback IP
address only (and thus makes the web interface visible only on the
local machine) and it automatically start your web browser pointing at the
server. For cross-machine collaboration, use the <b>server</b> command,
which binds on all IP addresses and does not try to start a web browser.</p>
<p>Servers are also easily configured as:
<ul>
<li>[./server.wiki#inetd|inetd/xinetd]
<li>[./server.wiki#cgi|CGI]
<li>[./server.wiki#scgi|SCGI]
</ul>
<p>The the [./selfhost.wiki | self-hosting fossil repositories] use
CGI.
<a name="proxy"></a>
<h2>HTTP Proxies</h2>
<p>If you are behind a restrictive firewall that requires you to use
an HTTP proxy to reach the internet, then you can configure the proxy
in three different ways. You can tell fossil about your proxy using
|