Changes between Version 3 and Version 4 of TracFastCgi
- Timestamp:
- 20/07/2009 15:23:49 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracFastCgi
v3 v4 71 71 == Simple Cherokee Configuration == 72 72 73 Configuration wanted. 73 The configuration on Cherokee's side is quite simple. You will only need to know that you can spawn Trac as an SCGI process. 74 You can either start it manually, or better yet, automatically by letting Cherokee spawn the server whenever it is down. 75 First set up an information source in cherokee-admin with a local interpreter. 76 77 {{{ 78 Host: 79 localhost:4433 80 81 Interpreter: 82 /usr/bin/tracd —single-env —daemonize —protocol=scgi —hostname=localhost —port=4433 /path/to/project/ 83 }}} 84 85 If the port was not reachable, the interpreter command would be launched. Note that, in the definition of the information source, you will have to manually launch the spawner if you use a ''Remote host'' as ''Information source'' instead of a ''Local interpreter''. 86 87 After doing this, we will just have to create a new rule managed by the SCGI handler to access Trac. It can be created in a new virtual server, trac.example.net for instance, and will only need two rules. The '''default''' one will use the SCGI handler associated to the previously created information source. 88 The second rule will be there to serve the few static files needed to correctly display the Trac interface. Create it as ''Directory rule'' for ''/chrome/common'' and just set it to the ''Static files'' handler and with a ''Document root'' that points to the appropriate files: ''/usr/share/trac/htdocs/'' 74 89 75 90 == Simple Lighttpd Configuration == … … 325 340 === Simple Nginx Configuration === 326 341 327 1) Nginx configuration snippet - confirmed to work on 0. 5.36342 1) Nginx configuration snippet - confirmed to work on 0.6.32 328 343 {{{ 329 344 server { … … 341 356 ssl_prefer_server_ciphers on; 342 357 358 # (Or ``^/some/prefix/(.*)``. 359 if ($uri ~ ^/(.*)) { 360 set $path_info /$1; 361 } 362 363 # You can copy this whole location to ``location [/some/prefix]/login`` 364 # and remove the auth entries below if you want Trac to enforce 365 # authorization where appropriate instead of needing to authenticate 366 # for accessing the whole site. 367 # (Or ``location /some/prefix``.) 343 368 location / { 344 369 auth_basic "trac realm"; 345 370 auth_basic_user_file /home/trac/htpasswd; 346 371 347 # full path348 if ($uri ~ ^/([^/]+)(/.*)) {349 set $script_name $1;350 set $path_info $2;351 }352 353 # index redirect354 if ($uri ~ ^/([^/]+)$) {355 rewrite (.+) $1/ permanent;356 }357 358 372 # socket address 359 373 fastcgi_pass unix:/home/trac/run/instance.sock; … … 363 377 364 378 ## WSGI REQUIRED VARIABLES 365 # WSGI application name - trac instance prefix. 366 fastcgi_param SCRIPT_NAME /$script_name; 379 # WSGI application name - trac instance prefix. 380 # (Or ``fastcgi_param SCRIPT_NAME /some/prefix``.) 381 fastcgi_param SCRIPT_NAME ""; 367 382 fastcgi_param PATH_INFO $path_info; 368 383 … … 374 389 375 390 # for authentication to work 391 fastcgi_param AUTH_USER $remote_user; 376 392 fastcgi_param REMOTE_USER $remote_user; 377 393 } … … 435 451 436 452 ---- 437 See also TracCgi, TracModPython, TracInstall, TracGuide, [trac:TracNginxRecipe TracNginxRecipe]453 See also: TracGuide, TracInstall, [wiki:TracModWSGI ModWSGI], [wiki:TracCgi CGI], [wiki:TracModPython ModPython], [trac:TracNginxRecipe TracNginxRecipe]