Changes between Version 1 and Version 2 of TracStandalone


Ignore:
Timestamp:
09/16/05 00:03:53 (20 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracStandalone

    v1 v2  
    88
    99 * Fewer dependencies: You don't need to install apache or any other web-server.
    10  * Fast: Should be as fast as the ModPython version (much faster than the cgi).
     10 * Fast: Should be as fast as the TracModPython version (much faster than the cgi).
    1111
    1212== Cons ==
     
    3030 $ tracd -p 8080 --auth project1,/tmp/users.htdigest,mycompany.com /path/to/project1
    3131}}}
     32htdigest authentication can also be used for more than one project.
     33The digest file can be shared:
     34{{{
     35 $ tracd -p 8080 \
     36   --auth project1,/tmp/users.htdigest,mycompany.com \
     37   --auth project2,/tmp/users.htdigest,mycompany.com \
     38   /path/to/project1 /path/to/project2
     39}}}
     40
     41== Tracd on Windows ==
     42
     43tracd also works on Windows. But on that platform,
     44the sensitivity on multithread issues is high.
     45tracd is not (yet!) very robust in multithread mode,
     46see for example #1401 and #1721 for some of the issues...
     47
     48I recently found out that all the occasional problems
     49(i.e. crashes) I had can be avoided by telling tracd
     50to operate in single-threaded mode:
     51{{{
     52#!text/x-diff
     53Index: trac/web/standalone.py
     54===================================================================
     55--- trac/web/standalone.py      (revision 1862)
     56+++ trac/web/standalone.py      (working copy)
     57@@ -124,7 +124,7 @@
     58         return auth['username']
    3259
    3360
     61-class TracHTTPServer(ThreadingMixIn, HTTPServer):
     62+class TracHTTPServer(HTTPServer):
     63
     64     projects = None
     65}}}
     66
     67== Generating passwords on Windows ==
     68
     69If you don't have Apache available, you can use this Python script to generate your passwords (code borrowed heavily from #845):
     70
     71{{{
     72from optparse import OptionParser
     73import md5
     74
     75# build the options
     76usage = "usage: %prog [options]"
     77parser = OptionParser(usage=usage)
     78parser.add_option("-u", "--username",action="store", dest="username", type = "string",
     79                  help="the username for whom to generate a password")
     80parser.add_option("-p", "--password",action="store", dest="password", type = "string",
     81                  help="the password to use")
     82(options, args) = parser.parse_args()
     83
     84# check options
     85if (options.username is None) or (options.password is None):
     86   parser.error("You must supply both the username and password")
     87   
     88# Generate the string to enter into the htdigest file
     89realm = 'trac'
     90kd = lambda x: md5.md5(':'.join(x)).hexdigest()
     91print ':'.join((options.username, realm, kd([options.username, realm, options.password])))
     92}}}
     93
    3494----
    35 See also: TracGuide, TracInstall, TracModPython
     95See also: [source:trunk/README.tracd#latest README.tracd], TracGuide, TracInstall, TracModPython