Changes between Version 3 and Version 4 of TracStandalone


Ignore:
Timestamp:
Jun 9, 2024, 1:47:47 PM (6 weeks ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracStandalone

    v3 v4  
    44It 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.
    55
    6 '''Pros'''
     6== Pros
     7
    78 * Fewer dependencies: You don't need to install Apache or any other web-server.
    89 * 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.
    910 * 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.
    1011
    11 '''Cons'''
     12== Cons
     13
    1214 * Fewer features: Tracd implements a very simple web-server and is not as configurable or as scalable as Apache httpd.
    1315
    1416== Usage examples
    1517
    16 A single project on port 8080, such as `http://localhost:8080/`:
     18A single project on port 8080. (http://localhost:8080/)
    1719{{{#!sh
    1820 $ tracd -p 8080 /path/to/project
    1921}}}
    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.
     22Strictly speaking this will make your Trac accessible to everybody from your network rather than ''localhost only''. To truly limit it use the `--hostname` option.
    2123{{{#!sh
    2224 $ tracd --hostname=localhost -p 8080 /path/to/project
    2325}}}
    24 With more than one project, for example `http://localhost:8080/project1/` and `http://localhost:8080/project2/`:
     26With more than one project. (http://localhost:8080/project1/ and http://localhost:8080/project2/)
    2527{{{#!sh
    2628 $ tracd -p 8080 /path/to/project1 /path/to/project2
     
    6163
    6264{{{#!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]]
     65Once 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]]
    6466`HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tracd\Parameters`
    6567
     
    9698
    9799{{{#!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).
    99101}}}
    100102
     
    114116 * '''project_path''': path of the project
    115117
    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.
    117119
    118120Examples:
     
    142144This section describes how to use `tracd` with Apache .htpasswd files.
    143145
    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.
    145147
    146148To create a .htpasswd file use Apache's `htpasswd` command (see [#GeneratingPasswordsWithoutApache below] for a method to create these files without using Apache):
     
    167169=== Digest authentication: Using a htdigest password file
    168170
    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.
     171If 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.
    170172
    171173Note that you can start tracd without the `--auth` argument, but if you click on the ''Login'' link you will get an error.
     
    173175=== Generating Passwords Without Apache
    174176
    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):
     177Basic 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
     179Trac also provides `htpasswd` and `htdigest` scripts in [https://trac.edgewall.org/browser/trunk/contrib contrib] (also available in the tar or zip archive):
    178180{{{#!sh
    179181$ ./contrib/htpasswd.py -cb htpasswd user1 user1
     
    205207             [--protocol {http,https,scgi,ajp,fcgi}] [--certfile CERTFILE]
    206208             [--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 ...]
    210212
    211213positional arguments:
    212214  envs                  path of the project environment(s)
    213215
    214 optional arguments:
     216options:
    215217  -h, --help            show this help message and exit
    216218  --version             show program's version number and exit
     
    338340=== Serving a different base path than /
    339341
    340 Tracd supports serving projects with different base urls than `/<project>` with the `base_path` parameter:
     342Tracd supports serving projects with different base urls than /<project>. The parameter name to change this is:
    341343{{{#!sh
    342344 $ tracd --base-path=/some/path