Fossil

Check-in [d9ab9c56]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merged the lists of socket listener daemons into the Socket Listener section of www/server/index.html: the list of known-working daemons down from the numbered list at the top of the article, and the list of potentially-working daemons up from the <noscript>-cloaked document matrix below. Also reordered the sections from simplest to most complex.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | server-docs
Files: files | file ages | folders
SHA3-256: d9ab9c567c500169a4b854d3218b311960d93ae422d6ad347acebd591a963304
User & Date: wyoung 2019-08-19 00:01:39
Context
2019-08-19
00:25
Justified the ordering of sections in www/server/index.html by including info on complexity. CGI remains last because CGI is only a "simple" option when someone else sets up the CGI security for you, as on old-style cheap hosting plans. Also added several inline sub-document references. check-in: 9f4121db user: wyoung tags: server-docs
00:01
Merged the lists of socket listener daemons into the Socket Listener section of www/server/index.html: the list of known-working daemons down from the numbered list at the top of the article, and the list of potentially-working daemons up from the <noscript>-cloaked document matrix below. Also reordered the sections from simplest to most complex. check-in: d9ab9c56 user: wyoung tags: server-docs
2019-08-18
10:26
Improvements to the nonce='$NONCE' substitution mechanism. check-in: 1c50073d user: drh tags: server-docs
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to www/server/index.html.

62
63
64
65
66
67
68
69
70
71
72
73

74
75
76
77
78
79
80
81
82
83
84

85
86
87
88
89

90
91
92
93
94
95
96


97
98
99

100
101
102
103
104
105
106












107
108
109
110
111
112
113
...
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213


<h2 id="methods">Methods</h2>

<p>There are basically four ways to set up a Fossil server:</p>

<ol>
  <li>Socket listener:
      <a id="inetd"      href="any/inetd.md">inetd</a>,
      <a id="xinetd"     href="any/xinetd.md">xinetd</a>,
      <a id="stunnel"    href="any/stunnel.md">stunnel</a>...
  <li><a id="standalone" href="any/none.md">Stand-alone HTTP server</a>

  <li><a id="scgi"       href="any/scgi.md">SCGI</a>
  <li><a id="cgi"        href="any/cgi.md">CGI</a>
</ol>

<p>All of these methods can serve either a single repository or a
directory hierarchy containing many repositories with names ending in
"<tt>.fossil</tt>".</p>

<p>You are not restricted to using a single method. The same Fossil
repository can be served using two or more of the above techniques at
the same time. You can also migrate from one method to another to

accommodate changes in hosting providers or administrator
preferences.</p>


<h3>Socket Listener</h3>


<p>The idea behind the socket listener approach is that each incoming
HTTP request is relayed to a new instance of the <a
href="/help?cmd=http"><tt>fossil http</tt></a> command.  That command
reads the HTTP request from its standard input, handles the request, and
writes a complete and correct HTTP reply on standard output which is
then returned to the client.</p>




<h3>Stand-alone HTTP Server</h3>


<p>A stand-alone server uses the <a href="/help?cmd=server"><tt>fossil
server</tt></a> command to run a process that listens for incoming HTTP
requests on a socket and then dispatches a copy of itself to deal with
each incoming request.  A stand-alone server can talk directly with the
client, or the system can be configured with a reverse proxy in between
the client and Fossil.</p>














<h3>CGI and SCGI</h3>

<p>Fossil can also be run using CGI from ordinary web servers such as
Apache, <a href="windows/cgi.md">IIS</a>, <tt>lighttpd</tt>, or
<tt>althttpd</tt>. The Fossil server administrator places a <a
................................................................................

<p>The method in the "<b>proxy</b>" column is for the platform's default
web server configured as a <a
href="https://en.wikipedia.org/wiki/Reverse_proxy">reverse proxy</a> for
Fossil's built-in HTTP server: <a href="debian/nginx.md">nginx</a>, <a
href="windows/iis.md">IIS</a>, Apache, etc.</p>

<p>There are several widely-deployed socket listener schemes besides the
<tt>inetd</tt>, <tt>xinetd</tt>, and <tt>stunnel</tt> schemes with
documents linked above: Apple’s <tt>launchd</tt>, Linux’s
<tt>systemd</tt>, Solaris’ SMF, etc. We would welcome <a
href="contribute.wiki">contributions</a> to cover these as well. We also
welcome contributions to fill gaps (<font size="-2">❌</font>) in the table
above.  </p>
</noscript>


<h2 id="more">Further Details</h2>

<ul>
  <li><a id="chroot"   href="../chroot.md"     >The Server Chroot Jail</a>







<
<
<
<

>





<
|



|
>
|
|


<
>

<
|
|
|
|
|
>
>


<
>

<
<
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>







 







<
<
<
<
|
|
<







62
63
64
65
66
67
68




69
70
71
72
73
74
75

76
77
78
79
80
81
82
83
84
85

86
87

88
89
90
91
92
93
94
95
96

97
98


99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
...
201
202
203
204
205
206
207




208
209

210
211
212
213
214
215
216


<h2 id="methods">Methods</h2>

<p>There are basically four ways to set up a Fossil server:</p>

<ol>




  <li><a id="standalone" href="any/none.md">Stand-alone HTTP server</a>
  <li>Socket listener
  <li><a id="scgi"       href="any/scgi.md">SCGI</a>
  <li><a id="cgi"        href="any/cgi.md">CGI</a>
</ol>

<p>All of these methods can serve either a single repository or a

directory containing repositories named "<tt>*.fossil</tt>".</p>

<p>You are not restricted to using a single method. The same Fossil
repository can be served using two or more of the above techniques at
the same time. These methods use clean, well-defined, standard
interfaces (CGI, SCGI, and HTTP) which allow you to easily migrate from
one method to another to accommodate changes in hosting providers or
administrator preferences.</p>



<h3>Stand-alone HTTP Server</h3>


<p>This is the easiest method.  A stand-alone server uses the <a
href="/help?cmd=server"><tt>fossil server</tt></a> command to run a
process that listens for incoming HTTP requests on a socket and then
dispatches a copy of itself to deal with each incoming request. You can
expose Fossil directly to the clients in this way or you can interpose a
<a href="https://en.wikipedia.org/wiki/Reverse_proxy">reverse proxy</a>
layer between the clients and Fossil.</p>



<h3>Socket Listener</h3>



<p>Only slightly more complicated is the socket listener method.
Instead of letting Fossil run in the background continuously to handle
HTTP requests from clients, you configure a socket listener daemon to
run a <a href="/help?cmd=http"><tt>fossil http</tt></a> command on each
HTTP hit.  That Fossil instance handles only that one hit and then shuts
back down, letting the socket listener go back to waiting for the next
hit.  This scheme is known to work with <a id="inetd"
href="any/inetd.md">inetd</a>, <a id="xinetd"
href="any/xinetd.md">xinetd</a>, and <a id="stunnel"
href="any/stunnel.md">stunnel</a>.</p>

<p>In principle, this method should also work with Apple’s
<tt>launchd</tt>, Linux’s <tt>systemd</tt>, and Solaris’ SMF, all of
which have similar socket listener features. We do not yet have
tutorials showing how to configure these advanced daemons for Fossil,
but we welcome <a href="contribute.wiki">contributions</a>.</p>


<h3>CGI and SCGI</h3>

<p>Fossil can also be run using CGI from ordinary web servers such as
Apache, <a href="windows/cgi.md">IIS</a>, <tt>lighttpd</tt>, or
<tt>althttpd</tt>. The Fossil server administrator places a <a
................................................................................

<p>The method in the "<b>proxy</b>" column is for the platform's default
web server configured as a <a
href="https://en.wikipedia.org/wiki/Reverse_proxy">reverse proxy</a> for
Fossil's built-in HTTP server: <a href="debian/nginx.md">nginx</a>, <a
href="windows/iis.md">IIS</a>, Apache, etc.</p>





<p>We welcome <a href="contribute.wiki">contributions</a> to fill gaps
(<font size="-2">❌</font>) in the table above.</p>

</noscript>


<h2 id="more">Further Details</h2>

<ul>
  <li><a id="chroot"   href="../chroot.md"     >The Server Chroot Jail</a>