Changes between Version 14 and Version 15 of TracFastCgi
- Timestamp:
- Sep 4, 2005, 7:51:18 PM (19 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracFastCgi
v14 v15 1 = Trac andFastCGI =1 = Trac with FastCGI = 2 2 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.3 Since 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. 4 4 5 5 == Simple Apache configuration == 6 6 {{{ 7 7 # 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) 9 10 <IfModule mod_fastcgi.c> 10 11 11 AddHandler fastcgi-script .fcgi 12 FastCgiIpcDir /var/lib/apache2/fastcgi 12 13 </IfModule> 13 14 LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so 14 15 }}} 15 16 16 You can either setup the TRAC_ENVas an overall default:17 You can either setup the `TRAC_ENV` as an overall default: 17 18 {{{ 18 19 FastCgiConfig -initial-env TRAC_ENV=/path/to/env/trac … … 24 25 }}} 25 26 26 Configure ''ScriptAlias'' or similar options as described in TracCgi, but calling cgi-bin/trac.fcgi instead of cgi-bin/trac.cgi27 Configure `ScriptAlias` or similar options as described in TracCgi, but calling `trac.fcgi` instead of `trac.cgi`. 27 28 28 29 == Simple Lighttpd Configuration == 30 29 31 The FastCGI front-end was developed primarily for use with alternative webservers, such as [http://www.lighttpd.net/ lighttpd]. 30 32 31 32 environments. It has a very low memory footprint compared to other web servers and takes care of cpu-load.33 lighttpd a secure, fast, compliant and very flexible web-server which has been optimized for high-performance 34 environments. It has a very low memory footprint compared to other web servers and takes care of CPU load. 33 35 34 Using TracFastCgi with lighttpd requires that the patch attached to #1305 be applied. You can thenadd the following to your lighttpd.conf:36 For using `trac.fcgi` with lighttpd add the following to your lighttpd.conf: 35 37 {{{ 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 ) 38 fastcgi.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 ) 41 46 ) 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/")44 47 }}} 45 48 46 Note that you will need to add a new entry to ''fastcgi.server'' for each separate Trac instance that you wish to run.49 Note 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. 47 50 48 Relaunch lighttpd, and browse to http://server/trac/to access Trac.51 Relaunch lighttpd, and browse to `http://yourhost.example.org/trac` to access Trac. 49 52 50 53 ---- 51 See also Trac Guide, TracInstall, TracCgi, TracMultipleProjects54 See also TracCgi, TracModPython, TracInstall, TracGuide