Fossil SCM

Improvements to the althttpd documentation.

drh 2019-08-21 17:37 trunk
Commit 44f1df9fefdb4e95184d4c8f8d23da78fa256e9eb09165ae47159329eae6bbc4
1 file changed +36 -31
--- www/server/any/althttpd.md
+++ www/server/any/althttpd.md
@@ -1,37 +1,42 @@
11
# Serving via althttpd
22
3
-The public SQLite and Fossil web sites are not purely served by Fossil
4
-for two reasons:
5
-
6
-1. We want access to these sites to be secured with TLS, which we do
7
- [via `stunnel`](./stunnel.md).
8
-
9
-2. Parts of these web sites are static, stored as plain files on disk,
10
- not as Fossil artifacts. We serve such files using a separate web
11
- server called [`althttpd`][ah], written by the primary author of
12
- both SQLite and Fossil, D. Richard Hipp. `althttpd` is a lightweight
13
- HTTP-only web server. It handles the static HTTP hits on
14
- <tt>sqlite.org</tt> and <tt>fossil-scm.org</tt>, delegating HTTPS
15
- hits to `stunnel` and dynamic content hits to Fossil [via
16
- CGI][cgi].
17
-
18
-The largest single chunk of static content served directly by `althttpd`
19
-rather than via Fossil is the [SQLite documentation][sd], which is built
20
-[from source files][ds]. We don’t want those output files stored in
21
-Fossil; we already keep that process’s *input* files in Fossil. Thus the
22
-choice to serve the output statically.
23
-
24
-In addition to the [server’s documentation page][ah], there is a large,
25
-helpful header comment in the server’s [single-file C
26
-implementation][ac]. Between that and the generic [Serving via CGI][cgi]
27
-docs, you should be able to figure out how to serve Fossil via
28
-`althttpd`.
3
+[Althttpd][althttpd]
4
+is a light-weight web server that has been used to implement the SQLite and
5
+Fossil websites for well over a decade. Althttpd strives for simplicity,
6
+security, ease of configuration, and low resource usage.
7
+
8
+To set up a Fossil server as CGI on a host running the althttpd web
9
+server, follow these steps.
10
+<ol>
11
+<li<p>Get the althttpd webserver running on the host. This is easily
12
+done by following the [althttpd documentation][althttpd].
13
+
14
+<li><p>Create a CGI script for your Fossil respository. The script will
15
+be typically be two lines of code that look something like this:
16
+
17
+~~~
18
+ #!/usr/bin/fossil
19
+ repository: /home/yourlogin/fossils/project.fossil
20
+~~~
21
+
22
+Modify the filenames to conform to your system, of course. The
23
+CGI script accepts [other options][cgi] besides the
24
+repository:" line. You can add in other options as you desire,
25
+but the single "repository:" line is normally all that is needed
26
+to get started.
27
+
28
+<li><p>Make the CGI script executable.
29
+
30
+<li><p>Verify that the fossil repository file and the directory that contains
31
+the repository are both writable by whatever user the web server is
32
+running and.
33
+</ol>
34
+
35
+And you are done. Visit the URL that corresponds to the CGI script
36
+you created to start using your Fossil server.
2937
3038
*[Return to the top-level Fossil server article.](../)*
3139
3240
33
-[ac]: https://sqlite.org/docsrc/file/misc/althttpd.c
34
-[ah]: https://sqlite.org/docsrc/doc/trunk/misc/althttpd.md
35
-[cgi]: ./cgi.md
36
-[ds]: https://sqlite.org/docsrc/
37
-[sd]: https://sqlite.org/docs.html
41
+[althttpd]: https://sqlite.org/docsrc/doc/trunk/misc/althttpd.md
42
+[cgi]: ../../cgi.wiki
3843
--- www/server/any/althttpd.md
+++ www/server/any/althttpd.md
@@ -1,37 +1,42 @@
1 # Serving via althttpd
2
3 The public SQLite and Fossil web sites are not purely served by Fossil
4 for two reasons:
5
6 1. We want access to these sites to be secured with TLS, which we do
7 [via `stunnel`](./stunnel.md).
8
9 2. Parts of these web sites are static, stored as plain files on disk,
10 not as Fossil artifacts. We serve such files using a separate web
11 server called [`althttpd`][ah], written by the primary author of
12 both SQLite and Fossil, D. Richard Hipp. `althttpd` is a lightweight
13 HTTP-only web server. It handles the static HTTP hits on
14 <tt>sqlite.org</tt> and <tt>fossil-scm.org</tt>, delegating HTTPS
15 hits to `stunnel` and dynamic content hits to Fossil [via
16 CGI][cgi].
17
18 The largest single chunk of static content served directly by `althttpd`
19 rather than via Fossil is the [SQLite documentation][sd], which is built
20 [from source files][ds]. We don’t want those output files stored in
21 Fossil; we already keep that process’s *input* files in Fossil. Thus the
22 choice to serve the output statically.
23
24 In addition to the [server’s documentation page][ah], there is a large,
25 helpful header comment in the server’s [single-file C
26 implementation][ac]. Between that and the generic [Serving via CGI][cgi]
27 docs, you should be able to figure out how to serve Fossil via
28 `althttpd`.
 
 
 
 
 
 
 
 
29
30 *[Return to the top-level Fossil server article.](../)*
31
32
33 [ac]: https://sqlite.org/docsrc/file/misc/althttpd.c
34 [ah]: https://sqlite.org/docsrc/doc/trunk/misc/althttpd.md
35 [cgi]: ./cgi.md
36 [ds]: https://sqlite.org/docsrc/
37 [sd]: https://sqlite.org/docs.html
38
--- www/server/any/althttpd.md
+++ www/server/any/althttpd.md
@@ -1,37 +1,42 @@
1 # Serving via althttpd
2
3 [Althttpd][althttpd]
4 is a light-weight web server that has been used to implement the SQLite and
5 Fossil websites for well over a decade. Althttpd strives for simplicity,
6 security, ease of configuration, and low resource usage.
7
8 To set up a Fossil server as CGI on a host running the althttpd web
9 server, follow these steps.
10 <ol>
11 <li<p>Get the althttpd webserver running on the host. This is easily
12 done by following the [althttpd documentation][althttpd].
13
14 <li><p>Create a CGI script for your Fossil respository. The script will
15 be typically be two lines of code that look something like this:
16
17 ~~~
18 #!/usr/bin/fossil
19 repository: /home/yourlogin/fossils/project.fossil
20 ~~~
21
22 Modify the filenames to conform to your system, of course. The
23 CGI script accepts [other options][cgi] besides the
24 repository:" line. You can add in other options as you desire,
25 but the single "repository:" line is normally all that is needed
26 to get started.
27
28 <li><p>Make the CGI script executable.
29
30 <li><p>Verify that the fossil repository file and the directory that contains
31 the repository are both writable by whatever user the web server is
32 running and.
33 </ol>
34
35 And you are done. Visit the URL that corresponds to the CGI script
36 you created to start using your Fossil server.
37
38 *[Return to the top-level Fossil server article.](../)*
39
40
41 [althttpd]: https://sqlite.org/docsrc/doc/trunk/misc/althttpd.md
42 [cgi]: ../../cgi.wiki
 
 
 
43

Keyboard Shortcuts

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