Edgewall Software

Changes between Version 29 and Version 30 of TracNginxRecipe


Ignore:
Timestamp:
Apr 23, 2022, 4:43:18 PM (2 years ago)
Author:
figaro
Comment:

Cosmetic updates, Fasterfox no longer under active development

Legend:

Unmodified
Added
Removed
Modified
  • TracNginxRecipe

    v29 v30  
    55This recipe below describes some setups of the [http://www.nginx.net/ Nginx] webserver in your Trac project. Nginx is an Apache replacement for load balancing purposes among other things and is written by [http://sysoev.ru/en/ Igor Sysoev].
    66
    7 First set up '''Nginx''' as your main web server and then set up multiple instances of '''tracd''' web server. Trac has an embedded webserver that is included in Trac and called tracd. Then you have Nginx serve requests to your tracd web server instances.
     7First set up '''Nginx''' as your main web server and then set up multiple instances of '''tracd''' web server. Trac has an embedded webserver called tracd. Then you have Nginx serve requests to your tracd web server instances.
    88
    99== Why you should use tracd behind Nginx
    1010
    11 This is a setup where Nginx acts as a load balancer. In addition, Tracd is lightweight and fast and it is easy to get working with Trac. You can start multiple instances of the tracd web server on different ports for different Trac projects. Nginx as your main webserver can serve requests to these instances of the tracd web server. This also works for multiple Trac Projects on multiple vhosts. In short it's fast, lightweight, and easy to set up.
     11This is a setup where Nginx acts as a load balancer. In addition, Tracd is lightweight and fast and it is easy to get working with Trac. You can start multiple instances of the tracd web server on the ports for different Trac projects. Nginx as your main webserver can serve requests to these instances of the tracd web server. This also works for multiple Trac Projects on multiple vhosts.
    1212
    1313Here are the steps you need to take:
    1414
    1515 1. Set up Nginx as your main webserver on port 80.
    16  1. Start multiple instances of the tracd embedded web server on different ports for each Trac project.
    17  1. Configure Nginx to serve requests to your various running instances of tracd webserver.
     16 1. Start multiple instances of the tracd web server on the ports for each Trac project.
     17 1. Configure Nginx to serve requests to your running instances of tracd web server.
    1818
    1919== Using tracd with Nginx in Cluster Mode
     
    2121When using Trac and Apache with multiple vhosts, and multiple Trac sites per vhost, and upgrading from Subversion 1.2.3 to 1.4, we hit [ticket:2611 this bug]:
    2222 * apache/mod_python occasionally segfaults.
    23  * apache/mod_python was causing strange occasional delays, likely related to the segfaults.
    24 
    25 '''Caveat''': Only use this with PostgreSQL. If you want to do this, but are on SQLite, then use Pacopablos [th:SqliteToPgScript Sqlite-to-Pg] script. We use it here, and it's great.
     23 * apache/mod_python was occasionally causing delays, likely related to the segfaults.
     24
     25'''Caveat''': Only use this with PostgreSQL. If you want to do this, but are on SQLite, then use Pacopablos [th:SqliteToPgScript Sqlite-to-Pg] script. It is used here.
    2626
    2727== Tracd - Trac's light and fast embedded web server
    2828
    29 Run multiple tracd instances. This offers a speed benefit if you use [http://fasterfox.mozdev.org/ FasterFox], as well as good concurrency responsiveness.
     29Run multiple tracd instances. This offers good concurrency responsiveness.
    3030
    3131Using the Gentoo init system, it is easy to create simple init scripts, which are attached to this page. Here is a simplified example:
     
    255255
    256256Startup '''rc.d''' script for '''FreeBSD''' that allows you to run !StandAlone server for '''multiple Trac Projects''' behind Nginx with '''ngx_http_proxy_module''' ''(proxy_pass)'' module.
    257 This script is better than the default FreeBSD rc.d script, because it supports multiple Trac Projects.
     257This script is an improvement over the default FreeBSD rc.d script, because it supports multiple Trac Projects.
    258258Also it supports '''authentication for each project separately''' with Trac basic authentication.
    259259