Changes from Version 1 of TracFastCgi

trac (IP:
12/06/05 23:14:19 (11 years ago)



  • TracFastCgi

    v v1  
     1= Trac with FastCGI = 
     3Since version 0.9, Trac supports being run through the [ 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 [ SuEXEC]. Additionally, it is supported by much wider variety of web servers. 
     5== Simple Apache configuration == 
     7# Enable fastcgi for .fcgi files 
     8# (If you're using a distro package for mod_fcgi, something like 
     9# this is probably already present) 
     10<IfModule mod_fastcgi.c> 
     11   AddHandler fastcgi-script .fcgi 
     12   FastCgiIpcDir /var/lib/apache2/fastcgi  
     14LoadModule fastcgi_module /usr/lib/apache2/modules/ 
     17You can either setup the `TRAC_ENV` as an overall default: 
     19FastCgiConfig -initial-env TRAC_ENV=/path/to/env/trac 
     22Or you can serve multiple Trac projects in a directory like: 
     24FastCgiConfig -initial-env TRAC_ENV_PARENT_DIR=/parent/dir/of/projects 
     27Configure `ScriptAlias` or similar options as described in TracCgi, but calling `trac.fcgi` instead of `trac.cgi`. 
     29== Simple Lighttpd Configuration == 
     31The FastCGI front-end was developed primarily for use with alternative webservers, such as [ lighttpd]. 
     33lighttpd is a secure, fast, compliant and very flexible web-server that 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. 
     36For using `trac.fcgi` with lighttpd add the following to your lighttpd.conf: 
     38fastcgi.server = ("/trac" => 
     39                   ("trac" => 
     40                     ("socket" => "/tmp/trac-fastcgi.sock", 
     41                      "bin-path" => "/path/to/cgi-bin/trac.fcgi", 
     42                      "check-local" => "disable", 
     43                      "bin-environment" => 
     44                        ("TRAC_ENV" => "/path/to/projenv") 
     45                     ) 
     46                   ) 
     47                 ) 
     50Note 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. 
     52Other important information like [ this updated TracInstall page], [wiki:TracCgi#MappingStaticResources and this] are useful for non-fastcgi specific installation aspects. 
     54Relaunch lighttpd, and browse to `` to access Trac. 
     57See also TracCgi, TracModPython, TracInstall, TracGuide