Fossil SCM

fossil-scm / www / server / any / inetd.md
1
# Serving via inetd
2
3
A Fossil server can be launched on-demand by `inetd` by using the
4
[`fossil http`](/help/http) command. To do so, add a line like the
5
following to its configuration file, typically `/etc/inetd.conf`:
6
7
80 stream tcp nowait.1000 root /usr/bin/fossil /usr/bin/fossil http /home/fossil/repo.fossil
8
9
In this example, you are telling `inetd` that when an incoming
10
connection appears on TCP port 80 that it should launch the program
11
`/usr/bin/fossil` with the arguments shown. Obviously you will need to
12
modify the pathnames for your particular setup. The final argument is
13
either the name of the fossil repository to be served or a directory
14
containing multiple repositories.
15
16
If you use a non-standard TCP port on systems where the port
17
specification must be a symbolic name and cannot be numeric, add the
18
desired name and port to `/etc/services`. For example, if you want your
19
Fossil server running on TCP port 12345 instead of 80, you will need to
20
add:
21
22
fossil 12345/tcp # fossil server
23
24
and use the symbolic name “`fossil`” instead of the numeric TCP port
25
number (“12345” in the above example) in `inetd.conf`.
26
27
Notice that we configured `inetd` to launch Fossil as root. See the
28
top-level section on “[The Fossil Chroot
29
Jail](../../chroot.md)” for the consequences of this and
30
alternatives to it.
31
32
You can instead configure `inetd` to bind to a higher-numbered TCP port,
33
allowing Fossil to be run as a normal user. In that case, Fossil will
34
not put itself into a chroot jail, because it assumes you have set up
35
file permissions and such on the server appropriate for that user.
36
37
The `inetd` daemon must be enabled for this to work, and it must be
38
restarted whenever its configuration file changes.
39
40
This is a more complicated method than the [standalone HTTP server
41
method](./none.md), but it has the advantage of only using system
42
resources when an actual connection is attempted. If no one ever
43
connects to that port, a Fossil server will not (automatically) run. It
44
has the disadvantage of requiring "root" access, which may not be
45
available to you, either due to local IT policy or because of
46
restrictions at your shared Internet hosting service.
47
48
For further details, see the relevant section in your system's
49
documentation. The FreeBSD Handbook covers `inetd` in [this
50
chapter](https://www.freebsd.org/doc/en/books/handbook/network-inetd.html).
51
52
*[Return to the top-level Fossil server article.](../)*
53

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button