Changes between Version 1 and Version 2 of TracCgi
- Timestamp:
- Jan 30, 2006, 11:09:16 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracCgi
v1 v2 3 3 To install Trac as a CGI script, you need to make the `trac.cgi` executable as a CGI by your web server. If you're using [http://httpd.apache.org/ Apache HTTPD], there are a couple ways to do that: 4 4 5 1. Use a `ScriptAlias` to map a nURL to the `trac.cgi` script5 1. Use a `ScriptAlias` to map a URL to the `trac.cgi` script 6 6 2. Copy the `trac.cgi` file into the directory for CGI executables used by your web server (commonly named `cgi-bin`). You can also create a symbolic link, but in that case make sure that the `FollowSymLinks` option is enabled for the `cgi-bin` directory. 7 7 … … 12 12 ScriptAlias /trac /usr/share/trac/cgi-bin/trac.cgi 13 13 14 # Trac need to know where the database is located14 # Trac needs to know where the database is located 15 15 <Location "/trac"> 16 16 SetEnv TRAC_ENV "/path/to/projectenv" … … 39 39 }}} 40 40 41 Note that whatever URL path you mapped the `trac.cgi` script to, the path `/chrome/common` is the path you have to append to that location to intercept requests to the static resources. 41 Note that whatever URL path you mapped the `trac.cgi` script to, the path `/chrome/common` is the path you have to append to that location to intercept requests to the static resources. 42 42 43 43 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`. 44 45 Alternatively, you can set the `htdocs_location` configuration option in [wiki:TracIni trac.ini]: 46 {{{ 47 [trac] 48 htdocs_location = /trac-htdocs 49 }}} 50 51 Trac will then use this URL when embedding static resources into HTML pages. Of course, you still need to make the Trac `htdocs` directory available through the web server at the specified URL, for example by copying (or linking) the directory into the document root of the web server. 44 52 45 53 == Adding Authentication ==