Changes between Version 1 and Version 2 of TracCgi


Ignore:
Timestamp:
Jan 30, 2006, 11:09:16 PM (17 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracCgi

    v1 v2  
    33To 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:
    44
    5  1. Use a `ScriptAlias` to map an URL to the `trac.cgi` script
     5 1. Use a `ScriptAlias` to map a URL to the `trac.cgi` script
    66 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.
    77
     
    1212ScriptAlias /trac /usr/share/trac/cgi-bin/trac.cgi
    1313
    14 # Trac need to know where the database is located
     14# Trac needs to know where the database is located
    1515<Location "/trac">
    1616  SetEnv TRAC_ENV "/path/to/projectenv"
     
    3939}}}
    4040
    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.
     41Note 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. 
    4242
    4343For 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
     45Alternatively, you can set the `htdocs_location` configuration option in [wiki:TracIni trac.ini]:
     46{{{
     47[trac]
     48htdocs_location = /trac-htdocs
     49}}}
     50
     51Trac 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.
    4452
    4553== Adding Authentication ==