Trac is being migrated to new services! Issues can be found in our new
YouTrack instance and WIKI pages can be found on our
website.
- Timestamp:
-
Aug 10, 2008, 8:15:55 PM (15 years ago)
- Author:
-
trac
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
|
v1
|
v2
|
|
| 33 | 33 | }}} |
| 34 | 34 | |
| 35 | | ''Note that the `SetEnv` directive requires the `mod_env` module to be installed and enable.'' |
| | 35 | ''Note that the `SetEnv` directive requires the `mod_env` module to be installed and enable. If not, you could set TRAC_ENV in trac.cgi. Just add the following code between "try:" and "from trac.web ...":'' |
| | 36 | |
| | 37 | {{{ |
| | 38 | import os |
| | 39 | os.environ['TRAC_ENV'] = "/path/to/projectenv" |
| | 40 | }}} |
| | 41 | |
| | 42 | '' Or for TRAC_ENV_PARENT_DIR: '' |
| | 43 | |
| | 44 | {{{ |
| | 45 | import os |
| | 46 | os.environ['TRAC_ENV_PARENT_DIR'] = "/path/to/project/parent/dir" |
| | 47 | }}} |
| 36 | 48 | |
| 37 | 49 | This will make Trac available at `http://yourhost.example.org/trac`. |
| … |
… |
|
| 60 | 72 | For example, if Trac is mapped to `/cgi-bin/trac.cgi` on your server, the URL of the Alias should be `/cgi-bin/trac.cgi/chrome/common`. |
| 61 | 73 | |
| | 74 | Similarly, if you have static resources in a projects htdocs directory, you can configure apache to serve those resources (again, put this '''before''' the `ScriptAlias` for the CGI script, and adjust names and locations to match your installation): |
| | 75 | |
| | 76 | {{{ |
| | 77 | Alias /trac/chrome/site /path/to/projectenv/htdocs |
| | 78 | <Directory "/path/to/projectenv/htdocs"> |
| | 79 | Order allow,deny |
| | 80 | Allow from all |
| | 81 | </Directory> |
| | 82 | }}} |
| | 83 | |
| 62 | 84 | Alternatively, you can set the `htdocs_location` configuration option in [wiki:TracIni trac.ini]: |
| 63 | 85 | {{{ |
| … |
… |
|
| 70 | 92 | $ ln -s /usr/share/trac/htdocs /var/www/your_site.com/htdocs/trac-htdocs |
| 71 | 93 | }}} |
| | 94 | |
| | 95 | Note that in order to get this `htdocs` directory, you need first to extract the relevant Trac resources using the `deploy` command of TracAdmin: |
| | 96 | [[TracAdminHelp(deploy)]] |
| | 97 | |
| 72 | 98 | |
| 73 | 99 | == Adding Authentication == |
| … |
… |
|
| 113 | 139 | }}} |
| 114 | 140 | |
| 115 | | For better security, it is recommended that you either enable SSL or at least use the “Digest” authentication scheme instead of “Basic”. Please read the [http://httpd.apache.org/docs/2.0/ Apache HTTPD documentation] to find out more. |
| | 141 | For better security, it is recommended that you either enable SSL or at least use the “Digest” authentication scheme instead of “Basic”. Please read the [http://httpd.apache.org/docs/2.0/ Apache HTTPD documentation] to find out more. For example, on a Debian 4.0r1 (etch) system the relevant section in apache configuration can look like this: |
| | 142 | {{{ |
| | 143 | <Location "/trac/login"> |
| | 144 | LoadModule auth_digest_module /usr/lib/apache2/modules/mod_auth_digest.so |
| | 145 | AuthType Digest |
| | 146 | AuthName "trac" |
| | 147 | AuthDigestDomain /trac |
| | 148 | AuthDigestFile /somewhere/trac.htpasswd |
| | 149 | Require valid-user |
| | 150 | </Location> |
| | 151 | }}} |
| | 152 | and you'll have to create your .htpasswd file with htdigest instead of htpasswd as follows: |
| | 153 | {{{ |
| | 154 | # htdigest /somewhere/trac.htpasswd trac admin |
| | 155 | }}} |
| | 156 | where the "trac" parameter above is the same as !AuthName above ("Realm" in apache-docs). |
| 116 | 157 | |
| 117 | 158 | ---- |
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!