# Changes between Version 2 and Version 3 of TracStandalone

Ignore:
Timestamp:
Oct 31, 2010 9:00:39 PM (12 years ago)
Comment:

--

### Legend:

Unmodified
 v2 The spacing here is important. {{{#!div 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]] HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tracd\Parameters Three (string) parameters are provided: ||!AppDirectory ||C:\Python26\ || ||Application ||python.exe || ||!AppParameters ||scripts\tracd-script.py -p 8080 ... || Note that, if the !AppDirectory is set as above, the paths of the executable ''and'' of the script name and parameter values are relative to the directory.  This makes updating Python a little simpler because the change can be limited, here, to a single point. (This is true for the path to the .htpasswd file, as well, despite the documentation calling out the /full/path/to/htpasswd; however, you may not wish to store that file under the Python directory.) }}} For Windows 7 User, srvany.exe may not be an option, so you can use [http://www.google.com/search?q=winserv.exe WINSERV] utility and run: {{{ == Using Authentication == Using tracd with Apache .htpasswd files: To create a .htpasswd file using htpasswd: {{{ $sudo htpasswd -c /path/to/env/.htpasswd username }}} then for additional users: {{{$ sudo htpasswd /path/to/env/.htpasswd username2 }}} then for starting the tracd (on windows skip the "=" after --basic-auth): {{{ tracd -p 8080 --basic-auth=environmentname,/fullpath/environmentname/.htpasswd,/fullpath/environmentname /fullpath/environmentname }}} 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. 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.) ''Support for Basic authentication was added in version 0.9.'' The general format for using authentication is (replace --auth with --basic-auth if you want to use Basic auth): The general format for using authentication is: {{{ $tracd -p port --auth="base_project_dir,password_file_path,realm" project_path * '''base_project_dir''': the base directory of the project specified as follows: * when serving multiple projects: ''relative'' to the project_bath * when serving multiple projects: ''relative'' to the project_path * when serving only a single project (-s): the name of the project directory Don't use an absolute path here as this won't work. ''Note:'' This parameter is case-sensitive even for environments on Windows. * '''realm''': the realm name (can be anything) * '''project_path''': path of the project * **--auth** in the above means use Digest authentication, replace --auth with --basic-auth if you want to use Basic auth Examples: and manually delete " -" from the end and add "${user}:trac:" to the start of line from 'to-file'. == Reference == Here's the online help, as a reminder (tracd --help): {{{ Usage: tracd [options] [projenv] ... Options: --version             show program's version number and exit -h, --help            show this help message and exit -a DIGESTAUTH, --auth=DIGESTAUTH [projectdir],[htdigest_file],[realm] --basic-auth=BASICAUTH [projectdir],[htpasswd_file],[realm] -p PORT, --port=PORT  the port number to bind to -b HOSTNAME, --hostname=HOSTNAME the host name or IP address to bind to --protocol=PROTOCOL   http|scgi|ajp -q, --unquote         unquote PATH_INFO (may be needed when using ajp) --http10              use HTTP/1.0 protocol version (default) --http11              use HTTP/1.1 protocol version instead of HTTP/1.0 -e PARENTDIR, --env-parent-dir=PARENTDIR parent directory of the project environments --base-path=BASE_PATH the initial portion of the request URL's "path" -r, --auto-reload     restart automatically when sources are modified -s, --single-env      only serve a single project without the project list }}} == Tips == ''Support for htdocs: TracLinks syntax was added in version 0.10'' === Using apache rewrite rules === In some situations when you choose to use tracd behind apache, you might experience issues with redirects, like being redirected to URLs with the wrong host or protocol. In this case (and only in this case), setting the [trac] use_base_url_for_redirect to true can help, as this will force Trac to use the value of [trac] base_url for doing the redirects. === Using tracd behind a proxy In some situations when you choose to use tracd behind Apache or another web server. In this situation, you might experience issues with redirects, like being redirected to URLs with the wrong host or protocol. In this case (and only in this case), setting the [trac] use_base_url_for_redirect to true can help, as this will force Trac to use the value of [trac] base_url for doing the redirects. If you're using the AJP protocol to connect with tracd (which is possible if you have flup installed), then you might experience problems with double quoting. Consider adding the --unquote parameter. See also [trac:TracOnWindowsIisAjp], [trac:TracNginxRecipe]. === Serving a different base path than / === ---- See also: TracInstall, TracCgi, TracModPython, TracGuide, [trac:TracOnWindowsStandalone?version=13#RunningTracdasservice Running tracd.exe as a Windows service], [trac:TracOnWindowsIisAjp], [trac:TracNginxRecipe] See also: TracInstall, TracCgi, TracModPython, TracGuide, [trac:TracOnWindowsStandalone#RunningTracdasservice Running tracd.exe as a Windows service]