Changes between Version 9 and Version 10 of TracFastCgi


Ignore:
Timestamp:
Feb 22, 2015, 8:27:20 AM (6 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracFastCgi

    v9 v10  
    1 [[PageOutline]]
    2 
    31= Trac with FastCGI =
     2[[TracGuideToc]]
     3[[PageOutline(2-5, Contents, floated)]]
    44
    55[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.
     
    6767A better method to specify path to Trac environment is to embed the path
    6868into `trac.fcgi` script itself. That doesn't require configuration of server
    69 environment variables, works for both FastCgi modules
     69environment variables, works for both [trac:FastCgi] modules
    7070(and for [http://www.lighttpd.net/ lighttpd] and CGI as well):
    7171{{{
     
    386386        ssl_prefer_server_ciphers   on;
    387387
    388         # (Or ``^/some/prefix/(.*)``.
    389         if ($uri ~ ^/(.*)) {
    390              set $path_info /$1;
     388        # it makes sense to serve static resources through Nginx (or ``~ [/some/prefix]/chrome/(.*)``)
     389        location ~ /chrome/(.*) {
     390             alias /home/trac/instance/static/htdocs/$1;
    391391        }
    392392
    393         # it makes sense to serve static resources through Nginx
    394         location /chrome/ {
    395              alias /home/trac/instance/static/htdocs/;
    396         }
    397 
    398         # You can copy this whole location to ``location [/some/prefix]/login``
     393        # You can copy this whole location to ``location [/some/prefix](/login)``
    399394        # and remove the auth entries below if you want Trac to enforce
    400395        # authorization where appropriate instead of needing to authenticate
    401396        # for accessing the whole site.
    402         # (Or ``location /some/prefix``.)
    403         location / {
     397        # (Or ``~ location /some/prefix(/.*)``.)
     398        location ~ (/.*) {
    404399            auth_basic            "trac realm";
    405400            auth_basic_user_file /home/trac/htpasswd;
     
    415410            # (Or ``fastcgi_param  SCRIPT_NAME  /some/prefix``.)
    416411            fastcgi_param  SCRIPT_NAME        "";
    417             fastcgi_param  PATH_INFO           $fastcgi_script_name;
     412            fastcgi_param  PATH_INFO          $1;
    418413
    419414            ## WSGI NEEDED VARIABLES - trac warns about them