Changes between Version 128 and Version 129 of TracStandalone
- Timestamp:
- Jun 14, 2022, 5:49:30 PM (22 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracStandalone
v128 v129 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 7 6 '''Pros''' 8 7 * Fewer dependencies: You don't need to install Apache or any other web-server. 9 8 * 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. 10 9 * 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. 11 10 12 == Cons 13 11 '''Cons''' 14 12 * Fewer features: Tracd implements a very simple web-server and is not as configurable or as scalable as Apache httpd. 15 13 16 14 == Usage examples 17 15 18 A single project on port 8080 . (http://localhost:8080/)16 A single project on port 8080, such as `http://localhost:8080/`: 19 17 {{{#!sh 20 18 $ tracd -p 8080 /path/to/project 21 19 }}} 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.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. 23 21 {{{#!sh 24 22 $ tracd --hostname=localhost -p 8080 /path/to/project 25 23 }}} 26 With more than one project . (http://localhost:8080/project1/ and http://localhost:8080/project2/)24 With more than one project, for example `http://localhost:8080/project1/` and `http://localhost:8080/project2/`: 27 25 {{{#!sh 28 26 $ tracd -p 8080 /path/to/project1 /path/to/project2 … … 63 61 64 62 {{{#!div 65 Once the service is installed, it might be simpler to run the Registry Editor rather than use the `reg add` command documented above. 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]] 66 64 `HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tracd\Parameters` 67 65 … … 98 96 99 97 {{{#!div style="border: 1pt dotted; margin: 1em" 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).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. 101 99 }}} 102 100 … … 116 114 * '''project_path''': path of the project 117 115 118 * **`--auth`** in the above means use Digest authentication, replace `--auth` with `--basic-auth` if you want to use Basic auth. 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. 119 117 120 118 Examples: … … 144 142 This section describes how to use `tracd` with Apache .htpasswd files. 145 143 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.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). 147 145 148 146 To create a .htpasswd file use Apache's `htpasswd` command (see [#GeneratingPasswordsWithoutApache below] for a method to create these files without using Apache): … … 169 167 === Digest authentication: Using a htdigest password file 170 168 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.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. 172 170 173 171 Note that you can start tracd without the `--auth` argument, but if you click on the ''Login'' link you will get an error. … … 175 173 === Generating Passwords Without Apache 176 174 177 Basic Authorization can be accomplished via this [http://aspirine.org/htpasswd_en.html online HTTP Password generator] which also supports `SHA-1`. 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. 178 176 179 177 Trac also provides `htpasswd` and `htdigest` scripts in `contrib`: … … 340 338 === Serving a different base path than / 341 339 342 Tracd supports serving projects with different base urls than /<project>. The parameter name to change this is:340 Tracd supports serving projects with different base urls than `/<project>` with the `base_path` parameter: 343 341 {{{#!sh 344 342 $ tracd --base-path=/some/path