Changes between Version 79 and Version 80 of TracStandalone
- Timestamp:
- Apr 10, 2010, 7:04:36 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracStandalone
v79 v80 1 ** Note: this page documents the 0.12 version of Trac, see [[0.11/TracStandalone]] if you need the previous version ** 1 2 = Tracd = 2 3 3 Tracd is a lightweight standalone Trac web server. In most cases it's easier to setup and runs faster than the [wiki:TracCgi CGI script]. 4 Tracd is a lightweight standalone Trac web server. 5 It can be used in a variety of situations, from a test or development server to a multiprocess setup behind another web server used as a load balancer. 4 6 5 7 == Pros == 6 8 7 9 * Fewer dependencies: You don't need to install apache or any other web-server. 8 * Fast: Should be almost as fast as the [wiki:TracModPython mod_python] version (and much faster than the [wiki:TracCgi CGI]) .10 * Fast: Should be almost as fast as the [wiki:TracModPython mod_python] version (and much faster than the [wiki:TracCgi CGI]), even more so since version 0.12 where the HTTP/1.1 version of the protocol is enabled by default 9 11 * Automatic reloading: For development, Tracd can be used in ''auto_reload'' mode, which will automatically restart the server whenever you make a change to the code (in Trac itself or in a plugin). 10 * Options for tracd: `-r, --auto-reload`11 12 12 13 == Cons == 13 14 14 * Fewer features: Tracd implements a very simple web-server and is not as configurable or as scalable as Apache HTTPD.15 * Fewer features: Tracd implements a very simple web-server and is not as configurable or as scalable as Apache httpd. 15 16 * No native HTTPS support: [http://www.rickk.com/sslwrap/ sslwrap] can be used instead, 16 17 or [http://trac.edgewall.org/wiki/STunnelTracd stunnel -- a tutorial on how to use stunnel with tracd] or Apache with mod_proxy. … … 72 73 73 74 == Using Authentication == 74 `tracd` provides support for both Basic and Digest authentication. The default is to use Digest. 75 76 Using tracd with Apache .htpasswd files: 77 78 To create a .htpasswd file using htpasswd: 79 80 {{{ 81 $ sudo htpasswd -c /path/to/env/.htpasswd username 82 }}} 83 then for additional users: 84 {{{ 85 $ sudo htpasswd /path/to/env/.htpasswd username2 86 }}} 87 then for starting the tracd (on windows skip the "=" after --basic-auth): 88 {{{ 89 tracd -p 8080 --basic-auth=environmentname,/fullpath/environmentname/.htpasswd,/fullpath/environmentname /fullpath/environmentname 90 }}} 91 92 `environmentname` is the directory name of the Trac project folder, as opposed to `/fullpath/environmentname` which is the full path to the Trac project folder. See below for another example. 93 94 Tracd provides support for both Basic and Digest authentication. The default is to use Digest; to use Basic authentication, replace `--auth` with `--basic-auth` in the examples below. (You must still specify a dialogic "realm", which can be an empty string by trailing the BASICAUTH with a comma.) 75 95 76 96 ''Support for Basic authentication was added in version 0.9.'' … … 190 210 }}} 191 211 192 Note: If you would like to use --basic-auth you need to use htpasswd tool from apache server to generate .htpasswd file. The remaining part is similar but make sure to use empty realm (i.e. coma after path). When using on Windows make sure to use -m option for it (did not tested it on *nix, so not sure if that is the case there). If you do not have Apache, [trac:source:/tags/trac-0.11b2/contrib/htpasswd.py htpasswd.py] may help. (Note that it requires a `crypt` or `fcrypt` module; see the source comments for details.) 212 213 Note: If you would like to use --basic-auth you need to use htpasswd tool from apache server to generate .htpasswd file. The remaining part is similar but make sure to use empty realm (i.e. coma after path). Make sure to use -m option for it. If you do not have Apache, [trac:source:/tags/trac-0.11/contrib/htpasswd.py htpasswd.py] may help. (Note that it requires a `crypt` or `fcrypt` module; see the source comments for details.) 193 214 194 215 It is possible to use md5sum utility to generate digest-password file using such method: … … 202 223 === Serving static content === 203 224 204 If `tracd` is the only web server used for the project,225 If `tracd` is the only web server used for the project, 205 226 it can also be used to distribute static content 206 227 (tarballs, Doxygen documentation, etc.) … … 211 232 Example: given a `$TRAC_ENV/htdocs/software-0.1.tar.gz` file, 212 233 the corresponding relative URL would be `/<project_name>/chrome/site/software-0.1.tar.gz`, 213 which in turn can be written using the relative link syntax 214 in the Wiki: `[/<project_name>/chrome/site/software-0.1.tar.gz]` 215 216 Since 0.10, Trac supports a new `htdocs:` TracLinks 217 syntax for the above. With this, the example link above can be written simply 218 `htdocs:software-0.1.tar.gz`. 234 which in turn can be written as `htdocs:software-0.1.tar.gz` (TracLinks syntax) or `[/<project_name>/chrome/site/software-0.1.tar.gz]` (relative link syntax). 235 236 ''Support for `htdocs:` TracLinks syntax was added in version 0.10'' 219 237 220 238 === Using apache rewrite rules === … … 228 246 229 247 ---- 230 See also: TracInstall, TracCgi, TracModPython, TracGuide, [trac:TracOnWindowsStandalone?version=13#RunningTracdasservice Running tracd.exe as a Windows service] 248 See also: TracInstall, TracCgi, TracModPython, TracGuide, [trac:TracOnWindowsStandalone?version=13#RunningTracdasservice Running tracd.exe as a Windows service], [trac:TracOnWindowsIisAjp], [trac:TracNginxRecipe]