Changes between Version 3 and Version 4 of TracStandalone
- Timestamp:
- Jun 9, 2024, 1:47:47 PM (5 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracStandalone
v3 v4 4 4 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. 5 5 6 '''Pros''' 6 == Pros 7 7 8 * Fewer dependencies: You don't need to install Apache or any other web-server. 8 9 * Fast: Should be almost as fast as the [wiki:TracModWSGI mod_wsgi] version (and much faster than the [wiki:TracCgi CGI]), especially since the HTTP/1.1 version of the protocol is enabled by default. 9 10 * 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, for example in Trac itself or in a plugin. 10 11 11 '''Cons''' 12 == Cons 13 12 14 * Fewer features: Tracd implements a very simple web-server and is not as configurable or as scalable as Apache httpd. 13 15 14 16 == Usage examples 15 17 16 A single project on port 8080 , such as `http://localhost:8080/`:18 A single project on port 8080. (http://localhost:8080/) 17 19 {{{#!sh 18 20 $ tracd -p 8080 /path/to/project 19 21 }}} 20 Strictly speaking this will make your Trac accessible to everybody from your network rather than `localhost` only. To truly limit it use the `--hostname` option.22 Strictly speaking this will make your Trac accessible to everybody from your network rather than ''localhost only''. To truly limit it use the `--hostname` option. 21 23 {{{#!sh 22 24 $ tracd --hostname=localhost -p 8080 /path/to/project 23 25 }}} 24 With more than one project , for example `http://localhost:8080/project1/` and `http://localhost:8080/project2/`:26 With more than one project. (http://localhost:8080/project1/ and http://localhost:8080/project2/) 25 27 {{{#!sh 26 28 $ tracd -p 8080 /path/to/project1 /path/to/project2 … … 61 63 62 64 {{{#!div 63 Once the service is installed, it might be simpler to run the Registry Editor rather than use the `reg add` command documented above. Navigate to:[[BR]]65 Once the service is installed, it might be simpler to run the Registry Editor rather than use the `reg add` command documented above. Navigate to:[[BR]] 64 66 `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tracd\Parameters` 65 67 … … 96 98 97 99 {{{#!div style="border: 1pt dotted; margin: 1em" 98 **Attention:** Make sure you place the generated password files on a filesystem which supports sub-second timestamps, as Trac will monitor their modified time and changes happening on a filesystem with too coarse-grained timestamp resolution , like `ext2` or `ext3` on Linux, or HFS+ on OSX.100 **Attention:** Make sure you place the generated password files on a filesystem which supports sub-second timestamps, as Trac will monitor their modified time and changes happening on a filesystem with too coarse-grained timestamp resolution (like `ext2` or `ext3` on Linux, or HFS+ on OSX). 99 101 }}} 100 102 … … 114 116 * '''project_path''': path of the project 115 117 116 * **`--auth`** in the above means use Digest authentication, replace `--auth` with `--basic-auth` if you want to use Basic auth. Although Basic authentication does not require a "realm", the command parser does, so the second comma is required, followed directly by the closing quote for an empty realm name.118 * **`--auth`** in the above means use Digest authentication, replace `--auth` with `--basic-auth` if you want to use Basic auth. Although Basic authentication does not require a "realm", the command parser does, so the second comma is required, followed directly by the closing quote for an empty realm name. 117 119 118 120 Examples: … … 142 144 This section describes how to use `tracd` with Apache .htpasswd files. 143 145 144 '''Note''': On Windows It is necessary to install the [https://pypi.python.org/pypi/passlib passlib] package in order to decode some htpasswd formats. Only `SHA-1` passwords work without this module (since Trac 1.0).146 '''Note''': On Windows It is necessary to install the [https://pypi.python.org/pypi/passlib passlib] package in order to decode some htpasswd formats. Only `SHA-1` passwords (since Trac 1.0) work without this module. 145 147 146 148 To create a .htpasswd file use Apache's `htpasswd` command (see [#GeneratingPasswordsWithoutApache below] for a method to create these files without using Apache): … … 167 169 === Digest authentication: Using a htdigest password file 168 170 169 If you have Apache available, you can use the htdigest command to generate the password file. Type 'htdigest' to get some usage instructions, or read [https://httpd.apache.org/docs/2.0/programs/htdigest.html this page] from the Apache manual to get precise instructions. You will be prompted for a password to enter for each user that you create.For the name of the password file, you can use whatever you like, but if you use something like `users.htdigest` it will remind you what the file contains. As a suggestion, put it in your <projectname>/conf folder along with the [TracIni trac.ini] file.171 If you have Apache available, you can use the htdigest command to generate the password file. Type 'htdigest' to get some usage instructions, or read [https://httpd.apache.org/docs/2.0/programs/htdigest.html this page] from the Apache manual to get precise instructions. You'll be prompted for a password to enter for each user that you create. For the name of the password file, you can use whatever you like, but if you use something like `users.htdigest` it will remind you what the file contains. As a suggestion, put it in your <projectname>/conf folder along with the [TracIni trac.ini] file. 170 172 171 173 Note that you can start tracd without the `--auth` argument, but if you click on the ''Login'' link you will get an error. … … 173 175 === Generating Passwords Without Apache 174 176 175 Basic Authorization can be accomplished via this [http://aspirine.org/htpasswd_en.html online HTTP Password generator] which also supports `SHA-1`. Copy the generated password-hash line to the .htpasswd file on your system. Note that Windows Python lacks the "crypt" module that is the default hash type for htpasswd. Windows Python can grok MD5 password hashes just fine and you should use MD5.176 177 Trac also provides `htpasswd` and `htdigest` scripts in `contrib` (in the Tar package):177 Basic Authorization can be accomplished via this [http://aspirine.org/htpasswd_en.html online HTTP Password generator] which also supports `SHA-1`. Copy the generated password-hash line to the .htpasswd file on your system. Note that Windows Python lacks the "crypt" module that is the default hash type for htpasswd. Windows Python can grok MD5 password hashes just fine and you should use MD5. 178 179 Trac also provides `htpasswd` and `htdigest` scripts in [https://trac.edgewall.org/browser/trunk/contrib contrib] (also available in the tar or zip archive): 178 180 {{{#!sh 179 181 $ ./contrib/htpasswd.py -cb htpasswd user1 user1 … … 205 207 [--protocol {http,https,scgi,ajp,fcgi}] [--certfile CERTFILE] 206 208 [--keyfile KEYFILE] [-q] [--base-path BASE_PATH] 207 [--http10 | --http11] [-r | -d] [--pidfile PIDFILE] 208 [-- umask MASK] [--group GROUP] [--user USER]209 [envs [envs ...]]209 [--http10 | --http11] [-r | -d] [--pidfile PIDFILE] [--umask MASK] 210 [--group GROUP] [--user USER] 211 [envs ...] 210 212 211 213 positional arguments: 212 214 envs path of the project environment(s) 213 215 214 option al arguments:216 options: 215 217 -h, --help show this help message and exit 216 218 --version show program's version number and exit … … 338 340 === Serving a different base path than / 339 341 340 Tracd supports serving projects with different base urls than `/<project>` with the `base_path` parameter:342 Tracd supports serving projects with different base urls than /<project>. The parameter name to change this is: 341 343 {{{#!sh 342 344 $ tracd --base-path=/some/path