close
Warning:
Can't synchronize with repository "(default)" (/var/svn/mioproject does not appear to be a Subversion repository.). Look in the Trac log for more information.
- Timestamp:
-
Jul 6, 2009, 10:44:11 PM (15 years ago)
- Author:
-
trac
- Comment:
-
--
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v1
|
v2
|
|
72 | 72 | == Simple Cherokee Configuration == |
73 | 73 | |
74 | | Configuration wanted. |
| 74 | The configuration on Cherokee's side is quite simple. You will only need to know that you can spawn Trac as an SCGI process. |
| 75 | You can either start it manually, or better yet, automatically by letting Cherokee spawn the server whenever it is down. |
| 76 | First set up an information source in cherokee-admin with a local interpreter. |
| 77 | |
| 78 | {{{ |
| 79 | Host: |
| 80 | localhost:4433 |
| 81 | |
| 82 | Interpreter: |
| 83 | /usr/bin/tracd —single-env —daemonize —protocol=scgi —hostname=localhost —port=4433 /path/to/project/ |
| 84 | }}} |
| 85 | |
| 86 | 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''. |
| 87 | |
| 88 | 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. |
| 89 | 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/'' |
75 | 90 | |
76 | 91 | == 単純な Lighttpd の設定 == #SimpleLighttpdConfiguration |
… |
… |
|
327 | 342 | === Simple Nginx Configuration === |
328 | 343 | |
329 | | 1) Nginx configuration snippet - confirmed to work on 0.5.36 |
| 344 | 1) Nginx configuration snippet - confirmed to work on 0.6.32 |
330 | 345 | {{{ |
331 | 346 | server { |
… |
… |
|
343 | 358 | ssl_prefer_server_ciphers on; |
344 | 359 | |
| 360 | # (Or ``^/some/prefix/(.*)``. |
| 361 | if ($uri ~ ^/(.*)) { |
| 362 | set $path_info /$1; |
| 363 | } |
| 364 | |
| 365 | # You can copy this whole location to ``location [/some/prefix]/login`` |
| 366 | # and remove the auth entries below if you want Trac to enforce |
| 367 | # authorization where appropriate instead of needing to authenticate |
| 368 | # for accessing the whole site. |
| 369 | # (Or ``location /some/prefix``.) |
345 | 370 | location / { |
346 | 371 | auth_basic "trac realm"; |
347 | 372 | auth_basic_user_file /home/trac/htpasswd; |
348 | 373 | |
349 | | # full path |
350 | | if ($uri ~ ^/([^/]+)(/.*)) { |
351 | | set $script_name $1; |
352 | | set $path_info $2; |
353 | | } |
354 | | |
355 | | # index redirect |
356 | | if ($uri ~ ^/([^/]+)$) { |
357 | | rewrite (.+) $1/ permanent; |
358 | | } |
359 | | |
360 | 374 | # socket address |
361 | 375 | fastcgi_pass unix:/home/trac/run/instance.sock; |
… |
… |
|
365 | 379 | |
366 | 380 | ## WSGI REQUIRED VARIABLES |
367 | | # WSGI application name - trac instance prefix. |
368 | | fastcgi_param SCRIPT_NAME /$script_name; |
| 381 | # WSGI application name - trac instance prefix. |
| 382 | # (Or ``fastcgi_param SCRIPT_NAME /some/prefix``.) |
| 383 | fastcgi_param SCRIPT_NAME ""; |
369 | 384 | fastcgi_param PATH_INFO $path_info; |
370 | 385 | |
… |
… |
|
376 | 391 | |
377 | 392 | # for authentication to work |
| 393 | fastcgi_param AUTH_USER $remote_user; |
378 | 394 | fastcgi_param REMOTE_USER $remote_user; |
379 | 395 | } |
… |
… |
|
437 | 453 | |
438 | 454 | ---- |
439 | | See also TracCgi, TracModPython, TracInstall, TracGuide, [http://trac.edgewall.org/wiki/TracNginxRecipe TracNginxRecipe] |
| 455 | See also: TracGuide, TracInstall, [wiki:TracModWSGI ModWSGI], [wiki:TracCgi CGI], [wiki:TracModPython ModPython], [http://trac.edgewall.org/wiki/TracNginxRecipe TracNginxRecipe] |