| | @@ -2,33 +2,17 @@ |
| 2 | 2 | |
| 3 | 3 | <h2>No Server Required</h2> |
| 4 | 4 | |
| 5 | 5 | <blockquote> |
| 6 | 6 | Fossil does <em>not</em> require a central server. |
| 7 | | -Data sharing and synchronization can be entirely peer-to-peer. |
| 8 | | -Fossil uses [https://en.wikipedia.org/wiki/Conflict-free_replicated_data_type|conflict-free replicated data types] |
| 9 | | -to ensure that (in the limit) all participating peers see the exact same content. |
| 10 | | -</blockquote> |
| 11 | | - |
| 12 | | -<h2>But, A Server Can Be Useful</h2> |
| 13 | | - |
| 14 | | -<blockquote> |
| 15 | | -Fossil does not require a server, |
| 16 | | -but a server does make collaboration easier. |
| 17 | | -A Fossil server also works well as a complete website for a project. |
| 18 | | -For example, the [https://www.fossil-scm.org/] website, including the |
| 19 | | -page you are now reading, |
| 20 | | -is just a Fossil server displaying the content of the |
| 21 | | -self-hosting repository for Fossil. |
| 22 | | - |
| 23 | | -This article is a guide for setting up your own Fossil server. |
| 24 | | - |
| 25 | | -See "[./aboutcgi.wiki|How CGI Works In Fossil]" for background |
| 26 | | -information on the underlying CGI technology. |
| 27 | | -See "[./sync.wiki|The Fossil Sync Protocol]" for information on the |
| 28 | | -wire protocol used for client/server communication. |
| 29 | | -</blockquote> |
| 7 | +But, [./server/whyuseaserver.wiki|a server can be very useful]. |
| 8 | + |
| 9 | +This article is a quick-reference guide for setting up your own |
| 10 | +Fossil server, with links to more detailed instructions specific |
| 11 | +to particular systems, should you want extra help. |
| 12 | +</blockquote> |
| 13 | + |
| 30 | 14 | |
| 31 | 15 | <h2 id="methods">Methods</h2> |
| 32 | 16 | |
| 33 | 17 | <blockquote> |
| 34 | 18 | There are basically four ways to set up a Fossil server: |
| | @@ -41,22 +25,54 @@ |
| 41 | 25 | <li><a id="standalone" href="./server/any/none.md">Stand-alone HTTP server</a> |
| 42 | 26 | <li><a id="scgi" href="./server/any/scgi.md">SCGI</a> |
| 43 | 27 | <li><a id="cgi" href="./server/any/cgi.md">CGI</a> |
| 44 | 28 | </ol> |
| 45 | 29 | |
| 46 | | -Fossil's HTTP server can be used standalone or you can put it behind |
| 47 | | -many different pieces of software via various proxying schemes: Apache, |
| 48 | | -nginx, HAProxy, stunnel (proxy mode), IIS... We cover some of those |
| 49 | | -options below. |
| 50 | | - |
| 51 | | -The CGI option works with many different web servers: Apache, IIS, |
| 52 | | -<tt>lighttpd</tt>, <tt>althttpd</tt>... Where CGI doesn't work, SCGI |
| 53 | | -usually does instead, such as in nginx. |
| 54 | | - |
| 55 | | -Regardless of the method you choose, all can serve either a single repository |
| 56 | | -or a directory hierarchy containing many repositories with names ending in ".fossil". |
| 57 | | - |
| 30 | +The idea behind the socket listener approach is that each incoming HTTP |
| 31 | +request is relayed to a new instance of the |
| 32 | +[/help?cmd=http|fossil http] command. That command reads the HTTP |
| 33 | +request from its standard input, handles the request, and writes a |
| 34 | +complete and correct HTTP reply on standard output which is then |
| 35 | +returned to the client. |
| 36 | + |
| 37 | +A stand-alone server uses the |
| 38 | +[/help?cmd=server|fossil server] command to run a process that |
| 39 | +listens for incoming HTTP requests on a socket and then dispatches |
| 40 | +a copy of itself to deal with each incoming request. A |
| 41 | +stand-alone server can talk directly with the client, or the |
| 42 | +system can be configured with a reverse proxy in between the |
| 43 | +client and Fossil. |
| 44 | + |
| 45 | +Fossil can also be run using CGI from ordinary web servers |
| 46 | +such as Apache, IIS, <tt>lighttpd</tt>, or <tt>althttpd</tt>. |
| 47 | +A [/help?cmd=cgi|short CGI script] is placed in the document |
| 48 | +hierarchy of the web server, and when a client requests the |
| 49 | +appropriate URL, Fossil is run to generate the responce. |
| 50 | +CGI is a good choice for incorporating Fossil as part of a |
| 51 | +larger website. The Fossil [./selfhost.wiki|self-hosting repositories] |
| 52 | +are implemented CGI running behind althttpd. |
| 53 | + |
| 54 | +For web servers such as Nginx that do not support |
| 55 | +CGI, Fossil can be run using SCGI. SCGI involves running |
| 56 | +the [/help?cmd=http|fossil http] command with the --scgi |
| 57 | +option. SCGI is something of a cross between a stand-alone server |
| 58 | +running behind a reverse proxy and an ordinary CGI server. |
| 59 | + |
| 60 | +Regardless of the method you choose, all can serve either a single |
| 61 | +repository or a directory hierarchy containing many repositories |
| 62 | +with names ending in ".fossil". |
| 63 | + |
| 64 | +Note that a single project is not restricted to using a single |
| 65 | +server setup method. The same Fossil repository can be served |
| 66 | +using two or more of the above techniques, at the same time. And |
| 67 | +the server setup can change over time, to accomodate changes |
| 68 | +in hosting providers or administrator preferences. |
| 69 | +</blockquote> |
| 70 | + |
| 71 | +<h2 id="matrix">System-Specific Setup Tutorials</h2> |
| 72 | + |
| 73 | +<blockquote> |
| 58 | 74 | We've broken the configuration for each method out into a series of |
| 59 | 75 | sub-articles, some of which are OS-specific: |
| 60 | 76 | </blockquote> |
| 61 | 77 | |
| 62 | 78 | <table style="margin-left: 6em;"> |
| | @@ -145,5 +161,8 @@ |
| 145 | 161 | |
| 146 | 162 | * <a name="chroot"></a>[./chroot.md | The Server Chroot Jail] |
| 147 | 163 | * <a name="loadmgmt"></a>[./loadmgmt.md | Managing Server Load] |
| 148 | 164 | * <a name="tls"></a>[./ssl.wiki | Securing a Repository with TLS] |
| 149 | 165 | * <a name="ext"></a>[./serverext.wiki | CGI Server Extensions] |
| 166 | + * [./aboutcgi.wiki|How CGI Works In Fossil] |
| 167 | + * See "[./sync.wiki|The Fossil Sync Protocol]" for information on the |
| 168 | + wire protocol used for syncing Fossil repositories. |
| 150 | 169 | |
| 151 | 170 | ADDED www/server/whyuseaserver.wiki |