Edgewall Software

Changes between Version 335 and Version 336 of TracInstall


Ignore:
Timestamp:
Feb 27, 2011, 3:20:32 PM (13 years ago)
Author:
Christian Boos
Comment:

Adding a #DeployingTrac section

Legend:

Unmodified
Added
Removed
Modified
  • TracInstall

    v335 v336  
    256256
    257257
    258 == Running the Standalone Server ==
     258== Deploying Trac
     259
     260=== Running the Standalone Server ===
    259261
    260262After having created a Trac environment, you can easily try the web interface by running the standalone server [wiki:TracStandalone tracd]:
     
    268270}}}
    269271
    270 == Running Trac on a Web Server ==
    271 
    272 Trac provides various options for connecting to a "real" web server: [wiki:TracCgi CGI], [wiki:TracFastCgi FastCGI], [wiki:TracModWSGI mod_wsgi] and [wiki:TracModPython mod_python]. For decent performance, it is recommended that you use either FastCGI or mod_wsgi.
    273 
    274 Trac also supports [trac:TracOnWindowsIisAjp AJP] which may be your choice if you want to connect to IIS.
    275 
    276 ==== Generating the Trac cgi-bin directory ====
     272=== Running Trac on a Web Server ===
     273
     274Trac provides various options for connecting to a "real" web server:
     275 - [wiki:TracFastCgi FastCGI]
     276 - [wiki:TracModWSGI mod_wsgi]
     277 - [wiki:TracModPython mod_python] (no longer recommended, as mod_python is not actively maintained anymore)
     278 - //[wiki:TracCgi CGI]// (should not be used, as the performance is far from optimal)
     279
     280Trac also supports [trac:TracOnWindowsIisAjp AJP] which may be your choice if you want to connect to IIS. Other deployment scenarios are possible: [trac:TracNginxRecipe nginx], [http://projects.unbit.it/uwsgi/wiki/Example#Traconapacheinasub-uri uwsgi], etc.
     281
     282==== Generating the Trac cgi-bin directory ==== #cgi-bin
    277283
    278284In order for Trac to function properly with FastCGI you need to have a `trac.fcgi` file and for mod_wsgi a `trac.wsgi` file. These are Python scripts which load the appropriate Python code. They can be generated using the `deploy` option of [wiki:TracAdmin trac-admin].
     
    295301There are two primary URL paths for static resources - `/chrome/common` and `/chrome/site`. Plugins can add their own resources usually accessible by `/chrome/plugin` path, so its important to override only known paths and not try to make universal `/chrome` alias for everything.
    296302
     303Note that in order to get those static resources on the filesystem, you need first to extract the relevant Trac resources using the `deploy` command of TracAdmin:
     304[[TracAdminHelp(deploy)]]
     305
     306See the `htdocs` directory within the target `<directory>`.
     307
     308
    297309===== Example: Apache and `ScriptAlias` =====
    298310
    299 Add the following snippet to Apache configuration '''before''' the `ScriptAlias` for the CGI script, changing paths to match your deployment:
     311Add the following snippet to Apache configuration ''before'' the `ScriptAlias` or `WsgiScriptAlias` (which maps all the other requests to the Trac application), changing paths to match your deployment:
    300312{{{
    301313Alias /trac/chrome/common /path/to/trac/htdocs/common
     
    342354$ ln -s /path/to/www/trac/htdocs /var/www/yourhost.example.org/trac-htdocs
    343355}}}
    344 
    345 Note that in order to get this `htdocs` directory, you need first to extract the relevant Trac resources using the `deploy` command of TracAdmin:
    346 [[TracAdminHelp(deploy)]]
    347356
    348357