Changes between Version 67 and Version 68 of TracFastCgi
- Timestamp:
- Feb 27, 2011, 4:23:10 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracFastCgi
v67 v68 1 1 = Trac with FastCGI = 2 2 3 [http://www.fastcgi.com/ FastCGI] interface allows Trac to remain resident much like with [wiki:TracModPython mod_python]. It is faster than external CGI interfaces which must start a new process for each request. However, unlike mod_python, FastCGI supports [http://httpd.apache.org/docs/suexec.html Apache SuEXEC], i.e. run with different permissions than web server. Additionally, it is supported by much wider variety of web servers. 3 [http://www.fastcgi.com/ FastCGI] interface allows Trac to remain resident much like with [wiki:TracModPython mod_python] or [wiki:TracModWSGI mod_wsgi]. It is faster than external CGI interfaces which must start a new process for each request. Additionally, it is supported by much wider variety of web servers. 4 5 Note that unlike mod_python, FastCGI supports [http://httpd.apache.org/docs/suexec.html Apache SuEXEC], i.e. run with different permissions than web server running with (`mod_wsgi` supports the `WSGIDaemonProcess` with user / group parameters to achieve the same effect). 4 6 5 7 '''Note for Windows:''' Trac's FastCGI does not run under Windows, as Windows does not implement `Socket.fromfd`, which is used by `_fcgi.py`. If you want to connect to IIS, you may want to try [trac:TracOnWindowsIisAjp AJP]. 8 9 [[PageOutline(2-3,Overview,inline)]] 10 6 11 7 12 == Simple Apache configuration == … … 10 15 `mod_fcgid` (preferred). The latter is more up-to-date. 11 16 12 === = setup with `mod_fastcgi` ====17 === setup with `mod_fastcgi` === 13 18 `mod_fastcgi` uses `FastCgiIpcDir` and `FastCgiConfig` directives that should be added to an appropriate Apache configuration file: 14 19 {{{ … … 37 42 }}} 38 43 39 === = setup with `mod_fcgid` ====44 === setup with `mod_fcgid` === 40 45 Configure `ScriptAlias` (see TracCgi for details), but call `trac.fcgi` 41 46 instead of `trac.cgi`. Note that slash at the end - it is important. … … 53 58 }}} 54 59 55 === = alternative environment setup ====60 === alternative environment setup === 56 61 A better method to specify path to Trac environment is to embed the path 57 62 into `trac.fcgi` script itself. That doesn't require configuration of server … … 76 81 }}} 77 82 83 78 84 == Simple Cherokee Configuration == 79 85 … … 101 107 sudo apt-get install python-flup 102 108 }}} 109 103 110 104 111 == Simple Lighttpd Configuration == … … 130 137 using `bin-environment` (as in the section above on Apache configuration). 131 138 132 Note that lighttpd has a bug related to 'SCRIPT_NAME' and 'PATH_INFO' when the uri of fastcgi.server is '/' instead of '/trac' in this example , see #Trac2418. This should be fixed since lighttpd 1.4.23, and you may need to add `"fix-root-scriptname" => "enable"` as parameter of fastcgi.server.139 Note that lighttpd has a bug related to 'SCRIPT_NAME' and 'PATH_INFO' when the uri of fastcgi.server is '/' instead of '/trac' in this example (see [trac:#2418]). This should be fixed since lighttpd 1.4.23, and you may need to add `"fix-root-scriptname" => "enable"` as parameter of fastcgi.server. 133 140 134 141 For using two projects with lighttpd add the following to your `lighttpd.conf`: … … 159 166 Note that the above will result in different processes in any event, even 160 167 if both are running from the same `trac.fcgi` script. 168 161 169 {{{ 162 170 #!div class=important 163 171 '''Note''' It's very important the order on which server.modules are loaded, if mod_auth is not loaded '''BEFORE''' mod_fastcgi, then the server will fail to authenticate the user. 164 172 }}} 173 165 174 For authentication you should enable mod_auth in lighttpd.conf 'server.modules', select auth.backend and auth rules: 166 175 {{{ … … 276 285 For details about languages specification see [trac:TracFaq TracFaq] question 2.13. 277 286 278 Other important information like [http://trac.lighttpd.net/trac/wiki/TracInstall this updated TracInstall page], [wiki:TracCgi#MappingStaticResources and this] are useful for non-fastcgi specific installation aspects. 279 280 If you use trac-0.9, read [http://lists.edgewall.com/archive/trac/2005-November/005311.html about small bug] 287 Other important information like the [wiki:TracInstall#MappingStaticResources mapping static resources advices] are useful for non-fastcgi specific installation aspects. 288 ] 281 289 282 290 Relaunch lighttpd, and browse to `http://yourhost.example.org/trac` to access Trac. … … 284 292 Note about running lighttpd with reduced permissions: 285 293 286 294 If nothing else helps and trac.fcgi doesn't start with lighttpd settings `server.username = "www-data"`, `server.groupname = "www-data"`, then in the `bin-environment` section set `PYTHON_EGG_CACHE` to the home directory of `www-data` or some other directory accessible to this account for writing. 287 295 288 296 … … 292 300 293 301 !LiteSpeed web server is an event-driven asynchronous Apache replacement designed from the ground-up to be secure, scalable, and operate with minimal resources. !LiteSpeed can operate directly from an Apache config file and is targeted for business-critical environments. 294 295 === Setup ===296 302 297 303 1. Please make sure you have first have a working install of a Trac project. Test install with “tracd” first. … … 353 359 http://yourdomain.com/trac/ 354 360 }}} 361 355 362 356 363 == Simple Nginx Configuration ==