Fossil

Diff
Login

Diff

Differences From Artifact [b0cb0b65d2]:

To Artifact [8482f9e03e]:


1
2
3
4
5

6
7
8
9
10
11
12
1
2
3
4

5
6
7
8
9
10
11
12




-
+







<title>CGI Server Extensions</title>

<h2>1.0 Introduction</h2>

If you have a [./server.wiki|Fossil server] for your project,
If you have a [./server/Fossil server] for your project,
you can add [https://en.wikipedia.org/wiki/Common_Gateway_Interface|CGI]
extensions to that server.  These extensions work like
any other CGI program, except that they also have access to the Fossil
login information and can (optionally) leverage the "skins" of Fossil
so that they appear to be more tightly integrated into the project.

An example of where this is useful is the 
25
26
27
28
29
30
31
32

33
34
35
36
37
38
39
40
41
42



43
44
45
46
47
48
49
25
26
27
28
29
30
31

32
33
34
35
36
37
38
39



40
41
42
43
44
45
46
47
48
49







-
+







-
-
-
+
+
+








<h2>2.0 How It Works</h2>

CGI Extensions are disabled by default.
An administrator activates the CGI extension mechanism by specifying
an "Extension Root Directory" or "extroot" as part of the server setup.
If the Fossil server is itself run as 
[./server.wiki#cgi|CGI], then add a line to the 
[./server/any/cgi.md|CGI], then add a line to the 
[./cgi.wiki#extroot|CGI script file] that says:

<blockquote><pre>
extroot: <i>DIRECTORY</i>
</pre></blockquote>

Or, if the Fossil server is begin run as using the 
"[./server.wiki#standalone|fossil server]" or
"[./server.wiki#standalone|fossil ui]" or 
"[./server.wiki#inetd|fossil http]" commands, then add an extra 
"[./server/any/none.md|fossil server]" or
"[./server/any/none.md|fossil ui]" or 
"[./server/any/inetd.md|fossil http]" commands, then add an extra 
"--extroot <i>DIRECTORY</i>" option to that command.

The <i>DIRECTORY</i> is the DOCUMENT_ROOT for the CGI.
Files in the DOCUMENT_ROOT are accessed via URLs like this:

<blockquote>
https://example-project.org/ext/<i>FILENAME</i>