Edgewall Software

Changes between Version 22 and Version 23 of TracNginxRecipe


Ignore:
Timestamp:
Nov 25, 2012, 2:26:19 AM (11 years ago)
Author:
anonymous
Comment:

Added sintax highlighting in scripts

Legend:

Unmodified
Added
Removed
Modified
  • TracNginxRecipe

    v22 v23  
    4343/etc/nginx/nginx.conf
    4444{{{
     45#!nginx
    4546http {
    4647  include         /etc/nginx/mime.types;
     
    7778/etc/nginx/nginx.conf
    7879{{{
     80#!nginx
    7981http {
    8082  include         /etc/nginx/mime.types;
     
    129131Serving static files from htdocs dir ala /<site>/chrome/site aliases `http://live.trachosts.com/myproj/chrome/site` to `/var/trachosts/trac/myproj/htdocs`
    130132{{{
     133#!nginx
    131134        location ~ /(.*?)/chrome/site/ {
    132135                rewrite /(.*?)/chrome/site/(.*) /$1/htdocs/$2 break;
     
    148151
    149152{{{
     153#!apache
    150154Listen 127.0.0.1:80
    151155<VirtualHost *:80>
     
    185189Add this to the server section of the Nginx config. (in the :80 line, or the :443, whatever)
    186190{{{
     191#!nginx
    187192location /svn {
    188193        proxy_pass      http://127.0.0.1:80;
     
    264269`/usr/local/etc/rc.d/trac`
    265270{{{
     271#!sh
    266272#!/bin/sh
    267273#
     
    423429This is the Nginx configuration snippet:
    424430{{{
     431#!nginx
    425432server {
    426433        location / {
     
    435442And then, you can start tracd with the following command if you use multi-project setup (notice the *):
    436443{{{
     444#!sh
    437445tracd --port=8000 --hostname=127.0.0.1 --env-parent-dir=/home/trac --basic-auth="*,/etc/nginx/htpasswd,Restricted"
    438446}}}
    439447Or the following command if you run one tracd per project:
    440448{{{
     449#!sh
    441450tracd --port=8000 --single-env /path/to/trac/environments/project --basic-auth="project,/etc/nginx/htpasswd,Restricted"
    442451}}}
     
    451460----
    452461See also TracFastCgi#SimpleNginxConfiguration1
     462{{{
     463#!sh
    453464          if [ $? -eq 0 ]
    454465           then
     
    472483          i=$(( $i + 1 ))
    473484          [ -z "$(eval echo "\${DIR_PROJECT_${i}}")" ]
     485}}}