Changes between Version 1 and Version 2 of TracStandalone
- Timestamp:
- 02/22/09 22:50:18 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracStandalone
v1 v2 40 40 To exit the server on Windows, be sure to use {{{CTRL-BREAK}}} -- using {{{CTRL-C}}} will leave a Python process running in the background. 41 41 42 When 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 42 44 43 45 == Using Authentication == … … 52 54 then for additional users: 53 55 {{{ 54 sudo htpasswd / var/www/html/.htpasswd-usersusername256 sudo htpasswd /path/to/env/.htpasswd username2 55 57 }}} 56 58 then for starting the tracd: … … 95 97 {{{ 96 98 $ tracd -p 8080 \ 97 --auth= *,/path/to/users.htdigest,mycompany.com \99 --auth="*",/path/to/users.htdigest,mycompany.com \ 98 100 /path/to/project1 /path/to/project2 99 101 }}} 102 If using the `-s` parameter for serving a Trac environment from the root of a domain, one must use `*` for the project name 100 103 101 104 == How to set up an htdigest password file == … … 112 115 #!python 113 116 from optparse import OptionParser 114 import md5 117 # The md5 module is deprecated in Python 2.5 118 try: 119 from hashlib import md5 120 except ImportError: 121 from md5 import md5 122 realm = 'trac' 115 123 116 124 # build the options … … 121 129 parser.add_option("-p", "--password",action="store", dest="password", type = "string", 122 130 help="the password to use") 131 parser.add_option("-r", "--realm",action="store", dest="realm", type = "string", 132 help="the realm in which to create the digest") 123 133 (options, args) = parser.parse_args() 124 134 … … 126 136 if (options.username is None) or (options.password is None): 127 137 parser.error("You must supply both the username and password") 138 if (options.realm is not None): 139 realm = options.realm 128 140 129 141 # Generate the string to enter into the htdigest file 130 realm = 'trac' 131 kd = lambda x: md5.md5(':'.join(x)).hexdigest() 142 kd = lambda x: md5(':'.join(x)).hexdigest() 132 143 print ':'.join((options.username, realm, kd([options.username, realm, options.password]))) 133 144 }}} … … 172 183 173 184 === Serving a different base path than / === 174 Tracd supports serving projects with different base urls th en /<project>. The parameter name to change this is185 Tracd supports serving projects with different base urls than /<project>. The parameter name to change this is 175 186 {{{ 176 187 tracd --base-path=/some/path … … 178 189 179 190 ---- 180 See also: TracInstall, TracCgi, TracModPython, TracGuide 191 See also: TracInstall, TracCgi, TracModPython, TracGuide, [trac:TracOnWindowsStandalone?version=13#RunningTracdasservice Running tracd.exe as a Windows service]