Changes between Version 2 and Version 3 of TracFastCgi
- Timestamp:
- Jan 22, 2021, 7:30:04 AM (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracFastCgi
v2 v3 4 4 [[PageOutline(2-5, Contents, floated)]] 5 5 6 [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 a much wider variety of web servers.6 [https://fastcgi-archives.github.io 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 a much wider variety of web servers. 7 7 8 8 Note that unlike mod_python, FastCGI supports [https://httpd.apache.org/docs/suexec.html Apache SuEXEC], ie run with different permissions than the web server runs with. `mod_wsgi` supports the `WSGIDaemonProcess` with user / group parameters to achieve the same effect. … … 27 27 <IfModule mod_fastcgi.c> 28 28 AddHandler fastcgi-script .fcgi 29 FastCgiIpcDir /var/lib/apache2/fastcgi 29 FastCgiIpcDir /var/lib/apache2/fastcgi 30 30 </IfModule> 31 31 LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so … … 48 48 You can also specify the `PYTHON_EGG_CACHE` environment variable using a second `-initial-env` directive: 49 49 {{{#!apache 50 FastCgiConfig -initial-env TRAC_ENV=/var/lib/trac \ 50 FastCgiConfig -initial-env TRAC_ENV=/var/lib/trac \ 51 51 -initial-env PYTHON_EGG_CACHE=/var/lib/trac/plugin-cache 52 52 }}} … … 122 122 var.fcgi_binary="/path/to/cgi-bin/trac.fcgi" # 0.10 name of prior fcgi executable 123 123 fastcgi.server = ("/trac" => 124 124 125 125 ("trac" => 126 126 ("socket" => "/tmp/trac-fastcgi.sock", … … 417 417 import trac.web._fcgi 418 418 419 fcgiserv = trac.web._fcgi.WSGIServer(dispatch_request, 419 fcgiserv = trac.web._fcgi.WSGIServer(dispatch_request, 420 420 bindAddress = sockaddr, umask = 7) 421 421 fcgiserv.run() … … 438 438 439 439 }}} 440 1. Reload nginx and launch trac.fcgi: 440 1. Reload nginx and launch trac.fcgi: 441 441 {{{#!sh 442 trac@trac.example ~ $ ./trac-standalone-fcgi.py 442 trac@trac.example ~ $ ./trac-standalone-fcgi.py 443 443 }}} 444 444 … … 451 451 * and patch from [trac:#7239] is applied, or you'll have to fix the socket file permissions every time 452 452 453 Unfortunately Nginx does not support variable expansion in fastcgi_pass directive. 454 Thus it is not possible to serve multiple Trac instances from one server block. 455 456 If you worry enough about security, run Trac instances under separate users. 453 Unfortunately Nginx does not support variable expansion in fastcgi_pass directive. 454 Thus it is not possible to serve multiple Trac instances from one server block. 455 456 If you worry enough about security, run Trac instances under separate users. 457 457 458 458 Another way to run Trac as a FCGI external application is offered in [trac:#6224].