221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
-
+
-
-
-
+
+
+
-
-
+
+
|
<font color="#a52a2a">72 </font><font color="#a52a2a"><b>fi</b></font><br>
<font color="#a52a2a">73 </font><br>
<font color="#a52a2a">74 </font><font color="#a52a2a"><b>exit</b></font> <font color="#ff00ff">0</font><br>
</font>
</nowiki>
<h4>Windows</h4>
<p>While it is far from a perfect set of instructions.. here are some quick notes that should help windows users along the way...</p>
<p>While it is far from a perfect set of instructions, here are some quick notes that should help windows users along the way.</p>
<ul>
<li>you need fossil.exe accessible by your web server or on your path.. easiest is to just chuck it in \%SYSTEM_ROOT%\ (usually c:\windows\) </li>
<li>assuming you are running apache, you need to either add the ExecCGI to the options on your DocumentRoot, or make sure the ScriptAlias directive is set and put your .cgi files in that folder..</li>
<li>the contents of your cgi file needs to essentially the same as above.. however paths needs to be windows friendly.. i have made sure that all folders on my test box are free of spaces, and as such this file works for me (obviously your paths may differ)
<li>you need fossil.exe accessible by your web server or on your path -- easiest is to just chuck it in \%SYSTEM_ROOT%\ (usually c:\windows\). </li>
<li>assuming you are running apache, you need to either add the ExecCGI to the options on your DocumentRoot, or make sure the ScriptAlias directive is set and put your .cgi files in that folder.</li>
<li>the contents of your cgi file need to be essentially the same as above, though paths need to be windows-friendly. I have made sure that all folders on my test box are free of spaces, and as such this file works for me (obviously your paths may differ).
<pre>
#! fossil.exe
repository: c:/wamp/www/dev/accounts.fossil
</pre>
I suppose you could put fossil.exe somewhere more specific and set the path to it as well, but since you are probably using the same executable for cmdline and cgi it kind of just makes sense to put it somewhere more accessible</li>
<li>As with most Windows based web instructions, permission are not as important, however at the least, you need to make sure that your repository is not flagged read-only, as you will encounter database errors if it is.</li>
I suppose you could put fossil.exe somewhere more specific and set the path to it as well, but since you are probably using the same executable for cmdline and cgi it kind of just makes sense to put it somewhere more accessible.</li>
<li>As with most Windows based web instructions, permissions are not as important, however at the least, you need to make sure that your repository is not flagged read-only, as you will encounter database errors if it is.</li>
</ul>
<h3>Discussion</h3>
Using the CGI server is the best solution combining an existing web infrastructure and the sharing of many <cite>Fossil</cite> repositories. Unlike the ad-hoc solution which requires, in effect, a separate port for each simultaneously-shared repository, and which requires several instances of fossil running -- one for each shared repository -- the CGI approach uses URLs to distinguish between repositories and only (briefly) runs a copy of fossil when the repository is actually accessed.
Sharing repositories with CGI is really only worth the effort if more than one repository is being shared, however. With only one being shared, <code>fossil server</code> is likely more than adequate or the use of (x)inetd may be indicated. If, however, there is already an existing web infrastructure in place, CGI still may be preferred if only for consistency and maintainability of the system as a whole.
|