• MAGE Grid Middleware Components
    • BPEL4Grid Engine
  • Grid Development Tools (GDT)
  • Virtualization Components
    • Xen Grid Engine (XGE)
    • Image Creation Station (ICS)
  • GridVPN

GDT

  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Search

Context Navigation

  • ← Previous Change
  • Wiki History
  • Next Change →

Changes between Version 1 and Version 2 of TracFastCgi


Ignore:
Timestamp:
04/09/08 13:31:38 (5 years ago)
Author:
trac
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TracFastCgi

    v1 v2  
    22 
    33Since version 0.9, Trac supports being run through the [http://www.fastcgi.com/ FastCGI] interface. Like [wiki:TracModPython mod_python], this allows Trac to remain resident, and is faster than external CGI interfaces which must start a new process for each request. However, unlike mod_python, it is able to support [http://httpd.apache.org/docs/suexec.html SuEXEC]. Additionally, it is supported by much wider variety of web servers. 
     4 
     5{{{ 
     6#!html 
     7<p style="background: #fdc; border: 2px solid #d00; font-style: italic; padding: 0 .5em; margin: 1em 0;"> 
     8<strong>Note for Windows:</strong> Trac's FCGI does not run under Windows, as Windows does not implement Socket.fromfd, which is used by _fcgi.py 
     9</p> 
     10}}} 
    411 
    512== Simple Apache configuration == 
    … …  
    714There are two FastCGI modules commonly available for Apache: `mod_fastcgi` and 
    815`mod_fcgid`.  The `FastCgiIpcDir` and `FastCgiConfig` directives discussed 
    9 below are `mod_fastcgi` directives; the `DefaultInitEnv` is a `mod_fgcid` 
     16below are `mod_fastcgi` directives; the `DefaultInitEnv` is a `mod_fcgid` 
    1017directive. 
    1118 
    … …  
    2229LoadModule fastcgi_module /usr/lib/apache2/modules/mod_fastcgi.so 
    2330}}} 
    24 Setting `FastCgiIpcDir` is optional if the default is suitable. 
     31Setting `FastCgiIpcDir` is optional if the default is suitable. Note that the `LoadModule` line must be after the `IfModule` group. 
    2532 
    2633Configure `ScriptAlias` or similar options as described in TracCgi, but 
    … …  
    173180# /trac/chrome/common, and use FastCGI for those 
    174181$HTTP["url"] =~ "^/trac(?!/chrome/common)" { 
    175 # If you have previous fastcgi.server declarations for applications other than Trac, use += here 
    176 # instead of = so you won't overwrite them 
     182# Even if you have other fastcgi.server declarations for applications other than Trac, do NOT use += here 
    177183fastcgi.server = ("/trac" => 
    178184                   ("trac" => 
    … …  
    244250  If nothing else helps and trac.fcgi doesn't start with lighttpd settings __server.username = "www-data"__, __server.groupname = "www-data"__, then in the `bin-environment` section set `PYTHON_EGG_CACHE` to the home directory of `www-data` or some other directory accessible to this account for writing. 
    245251 
     252 
     253== Simple LiteSpeed Configuration == 
     254 
     255The FastCGI front-end was developed primarily for use with alternative webservers, such as [http://www.litespeedtech.com/ LiteSpeed]. 
     256 
     257LiteSpeed web server is an event-driven asynchronous Apache replacement designed from the ground-up to be secure, scalable, and operate with minimal resources. LiteSpeed can operate directly from an Apache config file and is targeted for business-critical environments. 
     258 
     259Setup 
     260 
     2611) Please make sure you have first have a working install of a Trac project. Test install with “tracd” first. 
     262 
     2632) Create a Virtual Host for this setup. From now on we will refer to this vhost as TracVhost. For this tutorial we will be assuming that your trac project will be accessible via: 
     264 
     265{{{ 
     266http://yourdomain.com/trac/ 
     267}}} 
     268 
     2693) Go “TracVhost ? External Apps” tab and create a new “External Application”. 
     270 
     271{{{ 
     272Name: MyTracFCGI         
     273Address: uds://tmp/lshttpd/mytracfcgi.sock 
     274Max Connections: 10 
     275Environment: TRAC_ENV=/fullpathto/mytracproject/ <--- path to root folder of trac project 
     276Initial Request Timeout (secs): 30 
     277Retry Timeout (secs): 0 
     278Persistent Connection   Yes 
     279Connection Keepalive Timeout: 30 
     280Response Bufferring: No  
     281Auto Start: Yes 
     282Command: /usr/share/trac/cgi-bin/trac.fcgi  <--- path to trac.fcgi 
     283Back Log: 50 
     284Instances: 10 
     285}}} 
     286 
     2874) Optional. If you need to use htpasswd based authentication. Go to “TracVhost ? Security” tab and create a new security “Realm”. 
     288 
     289{{{ 
     290DB Type: Password File 
     291Realm Name: MyTracUserDB               <--- any name you wish and referenced later 
     292User DB Location: /fullpathto/htpasswd <--- path to your htpasswd file 
     293}}} 
     294 
     295If you don’t have a htpasswd file or don’t know how to create the entries within one, go to http://sherylcanter.com/encrypt.php, to generate the user:password combos. 
     296 
     2975) Go to “PythonVhost ? Contexts” and create a new “FCGI Context”. 
     298 
     299{{{ 
     300URI: /trac/                              <--- URI path to bind to python fcgi app we created     
     301Fast CGI App: [VHost Level] MyTractFCGI  <--- select the trac fcgi extapp we just created 
     302Realm: TracUserDB                        <--- only if (4) is set. select realm created in (4) 
     303}}} 
     304 
     3056) Modify /fullpathto/mytracproject/conf/trac.ini 
     306 
     307{{{ 
     308#find/set base_rul, url, and link variables 
     309base_url = http://yourdomain.com/trac/ <--- base url to generate correct links to 
     310url = http://yourdomain.com/trac/      <--- link of project 
     311link = http://yourdomain.com/trac/     <--- link of graphic logo 
     312}}} 
     313 
     3147) Restart LiteSpeed, “lswsctrl restart”, and access your new Trac project at:  
     315 
     316{{{ 
     317http://yourdomain.com/trac/ 
     318}}} 
     319 
    246320---- 
    247321See also TracCgi, TracModPython, TracInstall, TracGuide 

Trac Powered

Powered by Trac 0.12
By Edgewall Software.

Visit the MAGE project at
http://mage.uni-marburg.de/