Edgewall Software

Changes between Version 50 and Version 51 of TracFastCgi


Ignore:
Timestamp:
Dec 6, 2008, 12:15:15 AM (15 years ago)
Author:
ivan@…
Comment:

Simpler, also tested config for nginx.

Legend:

Unmodified
Added
Removed
Modified
  • TracFastCgi

    v50 v51  
    325325=== Simple Nginx Configuration ===
    326326
    327 1) Nginx configuration snippet - confirmed to work on 0.5.36
     3271) Nginx configuration snippet - confirmed to work on 0.6.32
    328328{{{
    329329    server {
     
    341341        ssl_prefer_server_ciphers   on;
    342342
     343        # (Or ``^/some/prefix/(.*)``.
     344        if ($uri ~ ^/(.*)) {
     345             set $path_info /$1;
     346        }
     347
     348        # You can copy this whole location to ``location [/some/prefix]/login``
     349        # and remove the auth entries below if you want Trac to enforce
     350        # authorization where appropriate instead of needing to authenticate
     351        # for accessing the whole site.
     352        # (Or ``location /some/prefix``.)
    343353        location / {
    344354            auth_basic            "trac realm";
    345355            auth_basic_user_file /home/trac/htpasswd;
    346356
    347             # full path
    348             if ($uri ~ ^/([^/]+)(/.*)) {
    349                  set $script_name $1;
    350                  set $path_info $2;
    351             }
    352 
    353             # index redirect
    354             if ($uri ~ ^/([^/]+)$) {
    355                  rewrite (.+) $1/ permanent;
    356             }
    357          
    358357            # socket address
    359358            fastcgi_pass   unix:/home/trac/run/instance.sock;
     
    363362
    364363            ## WSGI REQUIRED VARIABLES
    365             # WSGI application name - trac instance prefix.
    366             fastcgi_param  SCRIPT_NAME        /$script_name;
     364            # WSGI application name - trac instance prefix.
     365            # (Or ``fastcgi_param  SCRIPT_NAME  /some/prefix``.)
     366            fastcgi_param  SCRIPT_NAME        "";
    367367            fastcgi_param  PATH_INFO          $path_info;
    368368
     
    374374
    375375            # for authentication to work
     376            fastcgi_param  AUTH_USER          $remote_user;
    376377            fastcgi_param  REMOTE_USER        $remote_user;
    377378        }