Changes between Initial Version and Version 1 of TracStandalone


Ignore:
Timestamp:
Oct 11, 2005, 12:16:57 AM (19 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracStandalone

    v1 v1  
     1= Tracd =
     2
     3Tracd is a lightweight stand-alone Trac server. In most cases it's easier to setup and runs faster than trac.cgi.
     4
     5
     6== Pros ==
     7
     8 * Fewer dependencies: You don't need to install apache or any other web-server.
     9 * Fast: Should be as fast as the TracModPython version (much faster than the cgi).
     10
     11== Cons ==
     12
     13 * Less features: Tracd implements a very simple web-server and is not as configurable as apache.
     14 * Only htdigest authentication: Tracd can currently only authenticate users against apache-htdigest files.
     15 * No native https support: [http://www.rickk.com/sslwrap/ sslwrap] can be used instead,
     16   or [http://lists.edgewall.com/archive/trac/2005-August/004381.html STUNNEL].
     17
     18== Usage examples ==
     19
     20A single project on port 8080. (http://localhost:8080/)
     21{{{
     22 $ tracd -p 8080 /path/to/project
     23}}}
     24With more than one project. (http://localhost:8080/project1/ and http://localhost:8080/project2/)
     25{{{
     26 $ tracd -p 8080 /path/to/project1 /path/to/project2
     27}}}
     28With htdigest authentication. The file /tmp/users.htdigest contain user accounts for project1 with the realm "mycompany.com".
     29{{{
     30 $ tracd -p 8080 --auth project1,/tmp/users.htdigest,mycompany.com /path/to/project1
     31}}}
     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.
     44But on that platform, the sensitivity on multithreading issues is high,
     45and you ''might'' have problems (i.e. crashes of the Python interpreter).
     46If this happens, you can force tracd to operate in single-threaded mode:
     47{{{
     48#!text/x-diff
     49Index: trac/web/standalone.py
     50===================================================================
     51--- trac/web/standalone.py      (revision 1862)
     52+++ trac/web/standalone.py      (working copy)
     53@@ -124,7 +124,7 @@
     54         return auth['username']
     55
     56
     57-class TracHTTPServer(ThreadingMixIn, HTTPServer):
     58+class TracHTTPServer(HTTPServer):
     59
     60     projects = None
     61}}}
     62
     63Please also report any such issue, as they are believed to be fixed by now.
     64
     65
     66== Generating passwords on Windows ==
     67
     68If you don't have Apache available, you can use this Python script to generate your passwords (code borrowed heavily from #845):
     69
     70{{{
     71from optparse import OptionParser
     72import md5
     73
     74# build the options
     75usage = "usage: %prog [options]"
     76parser = OptionParser(usage=usage)
     77parser.add_option("-u", "--username",action="store", dest="username", type = "string",
     78                  help="the username for whom to generate a password")
     79parser.add_option("-p", "--password",action="store", dest="password", type = "string",
     80                  help="the password to use")
     81(options, args) = parser.parse_args()
     82
     83# check options
     84if (options.username is None) or (options.password is None):
     85   parser.error("You must supply both the username and password")
     86   
     87# Generate the string to enter into the htdigest file
     88realm = 'trac'
     89kd = lambda x: md5.md5(':'.join(x)).hexdigest()
     90print ':'.join((options.username, realm, kd([options.username, realm, options.password])))
     91}}}
     92
     93----
     94See also: [source:trunk/README.tracd#latest README.tracd], TracGuide, TracInstall, TracModPython