Edgewall Software

Changes between Version 14 and Version 15 of TracFastCgi


Ignore:
Timestamp:
Sep 4, 2005, 7:51:18 PM (19 years ago)
Author:
Christopher Lenz
Comment:

Cleanup

Legend:

Unmodified
Added
Removed
Modified
  • TracFastCgi

    v14 v15  
    1 = Trac and FastCGI =
     1= Trac with FastCGI =
    22
    3 There is support in the Trac trunk as of [1399] for the [http://www.fastcgi.com/ FastCGI] interface. Like TracModPython, this allows trac to remain resident, and is faster than external CGI interfaces which must start a new process for each page view. However, unlike mod_python, it is able to support [http://httpd.apache.org/docs/suexec.html SuEXEC]. Additionally, it is supported by much wider variety of webservers.
     3Since version 0.9, Trac supports being run through the [http://www.fastcgi.com/ FastCGI] interface. Like [wiki:TracModPython mod_python], this allows Trac to remain resident, and is faster than external CGI interfaces which must start a new process for each request. However, unlike mod_python, it is able to support [http://httpd.apache.org/docs/suexec.html SuEXEC]. Additionally, it is supported by much wider variety of web servers.
    44
    55== Simple Apache configuration ==
    66{{{
    77# Enable fastcgi for .fcgi files
    8 # if using a distro package for mod_fcgi, something like this is probably already done
     8# (If you're using a distro package for mod_fcgi, something like
     9# this is probably already present)
    910<IfModule mod_fastcgi.c>
    10      AddHandler fastcgi-script .fcgi
    11      FastCgiIpcDir /var/lib/apache2/fastcgi
     11   AddHandler fastcgi-script .fcgi
     12   FastCgiIpcDir /var/lib/apache2/fastcgi
    1213</IfModule>
    1314LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so
    1415}}}
    1516
    16 You can either setup the TRAC_ENV as an overall default:
     17You can either setup the `TRAC_ENV` as an overall default:
    1718{{{
    1819FastCgiConfig -initial-env TRAC_ENV=/path/to/env/trac
     
    2425}}}
    2526
    26 Configure ''ScriptAlias'' or similar options as described in TracCgi, but calling cgi-bin/trac.fcgi instead of cgi-bin/trac.cgi
     27Configure `ScriptAlias` or similar options as described in TracCgi, but calling `trac.fcgi` instead of `trac.cgi`.
    2728
    2829== Simple Lighttpd Configuration ==
     30
    2931The FastCGI front-end was developed primarily for use with alternative webservers, such as [http://www.lighttpd.net/ lighttpd].
    3032
    31   lighttpd a secure, fast, compliant and very flexible web-server which has been optimized for high-performance
    32 environments.  It has a very low memory footprint compared to other webservers and takes care of cpu-load.
     33lighttpd a secure, fast, compliant and very flexible web-server which has been optimized for high-performance
     34environments.  It has a very low memory footprint compared to other web servers and takes care of CPU load.
    3335
    34 Using TracFastCgi with lighttpd requires that the patch attached to #1305 be applied.  You can then add the following to your lighttpd.conf:
     36For using `trac.fcgi` with lighttpd add the following to your lighttpd.conf:
    3537{{{
    36 fastcgi.server = ("trac.fcgi" => ( "trac.fcgi" => ( "socket" => "/tmp/trac-fastcgi.socket",
    37                                                     "bin-path" => "/path/to/cgi-bin/trac.fcgi",
    38                                                     "bin-environment" => ("TRAC_ENV" => "/path/to/env/trac")
    39                                                   )
    40                                  )
     38fastcgi.server = ("/trac" =>
     39                   ("trac" =>
     40                     ("socket" => "/tmp/trac-fastcgi.sock",
     41                      "bin-path" => "/path/to/cgi-bin/trac.fcgi",
     42                      "bin-environment" =>
     43                        ("TRAC_ENV" => "/path/to/projenv")
     44                     )
     45                   )
    4146                 )
    42 alias.url = ( "/cgi-bin/" => "/path/to/cgi-bin/", "/trac/" => "/usr/share/trac/htdocs/")
    43 url.rewrite-final = ("^/trac(.*)" => "/cgi-bin/trac.fcgi$1", "^/trac/?$" => "/trac/timeline/")
    4447}}}
    4548
    46 Note that you will need to add a new entry to ''fastcgi.server'' for each separate Trac instance that you wish to run.
     49Note that you will need to add a new entry to `fastcgi.server` for each separate Trac instance that you wish to run. Alternatively, you may use the `TRAC_ENV_PARENT_DIR` variable instead of `TRAC_ENV` as described  above.
    4750
    48 Relaunch lighttpd, and browse to http://server/trac/ to access Trac.
     51Relaunch lighttpd, and browse to `http://yourhost.example.org/trac` to access Trac.
    4952
    5053----
    51 See also TracGuide, TracInstall, TracCgi, TracMultipleProjects
     54See also TracCgi, TracModPython, TracInstall, TracGuide