Changes between Version 3 and Version 4 of TracStandalone


Ignore:
Timestamp:
Apr 6, 2009, 6:53:59 PM (15 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracStandalone

    v3 v4  
    4040To exit the server on Windows, be sure to use {{{CTRL-BREAK}}} -- using {{{CTRL-C}}} will leave a Python process running in the background.
    4141
     42When running as a Windows service using a utility such as [http://www.google.com/search?q=srvany.exe SRVANY], stopping or restarting the service will also leave a Python process running -- restart the system instead.
     43
    4244
    4345== Using Authentication ==
     
    5254then for additional users:
    5355{{{
    54 sudo htpasswd /var/www/html/.htpasswd-users username2
     56sudo htpasswd /path/to/env/.htpasswd username2
    5557}}}
    5658then for starting the tracd:
     
    9597{{{
    9698 $ tracd -p 8080 \
    97    --auth=*,/path/to/users.htdigest,mycompany.com \
     99   --auth="*",/path/to/users.htdigest,mycompany.com \
    98100   /path/to/project1 /path/to/project2
    99101}}}
     102If using the `-s` parameter for serving a Trac environment from the root of a domain, one must use `*` for the project name
    100103
    101104== How to set up an htdigest password file ==
     
    112115#!python
    113116from optparse import OptionParser
    114 import md5
     117# The md5 module is deprecated in Python 2.5
     118try:
     119    from hashlib import md5
     120except ImportError:
     121    from md5 import md5
     122realm = 'trac'
    115123
    116124# build the options
     
    121129parser.add_option("-p", "--password",action="store", dest="password", type = "string",
    122130                  help="the password to use")
     131parser.add_option("-r", "--realm",action="store", dest="realm", type = "string",
     132                  help="the realm in which to create the digest")
    123133(options, args) = parser.parse_args()
    124134
     
    126136if (options.username is None) or (options.password is None):
    127137   parser.error("You must supply both the username and password")
     138if (options.realm is not None):
     139   realm = options.realm
    128140   
    129141# Generate the string to enter into the htdigest file
    130 realm = 'trac'
    131 kd = lambda x: md5.md5(':'.join(x)).hexdigest()
     142kd = lambda x: md5(':'.join(x)).hexdigest()
    132143print ':'.join((options.username, realm, kd([options.username, realm, options.password])))
    133144}}}
     
    172183
    173184=== Serving a different base path than / ===
    174 Tracd supports serving projects with different base urls then /<project>. The parameter name to change this is
     185Tracd supports serving projects with different base urls than /<project>. The parameter name to change this is
    175186{{{
    176187tracd --base-path=/some/path
     
    178189
    179190----
    180 See also: TracInstall, TracCgi, TracModPython, TracGuide
     191See also: TracInstall, TracCgi, TracModPython, TracGuide, [trac:TracOnWindowsStandalone?version=13#RunningTracdasservice Running tracd.exe as a Windows service]