Changes between Version 29 and Version 30 of TracNginxRecipe
- Timestamp:
- Apr 23, 2022, 4:43:18 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracNginxRecipe
v29 v30 5 5 This 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]. 6 6 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 andcalled tracd. Then you have Nginx serve requests to your tracd web server instances.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 called tracd. Then you have Nginx serve requests to your tracd web server instances. 8 8 9 9 == Why you should use tracd behind Nginx 10 10 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.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 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. 12 12 13 13 Here are the steps you need to take: 14 14 15 15 1. Set up Nginx as your main webserver on port 80. 16 1. Start multiple instances of the tracd embedded web server on differentports 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. 18 18 19 19 == Using tracd with Nginx in Cluster Mode … … 21 21 When 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]: 22 22 * apache/mod_python occasionally segfaults. 23 * apache/mod_python was causing strange occasionaldelays, 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. 26 26 27 27 == Tracd - Trac's light and fast embedded web server 28 28 29 Run multiple tracd instances. This offers a speed benefit if you use [http://fasterfox.mozdev.org/ FasterFox], as well asgood concurrency responsiveness.29 Run multiple tracd instances. This offers good concurrency responsiveness. 30 30 31 31 Using the Gentoo init system, it is easy to create simple init scripts, which are attached to this page. Here is a simplified example: … … 255 255 256 256 Startup '''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 thanthe default FreeBSD rc.d script, because it supports multiple Trac Projects.257 This script is an improvement over the default FreeBSD rc.d script, because it supports multiple Trac Projects. 258 258 Also it supports '''authentication for each project separately''' with Trac basic authentication. 259 259