nginx+trac多项目配置(trac用fast-cgi模式)

安装就不废话了,网上非常多。这里主要介绍一下nginx+trac使用fast-cgi模式下的超懒人配置。基本上使用系统默认,不用做大的调整。

nginx配置如下:

server {
    listen 80;
    server_name 这里是域名;

    location / {
        #这里的端口要和tracd配置的一致
        fastcgi_pass localhost:8000;
        include fastcgi_params;
        fastcgi_param  SCRIPT_NAME        "";
        fastcgi_param  PATH_INFO          $fastcgi_script_name;
    }

    access_log 日志位置;
}

tracd启动命令:

#这里的/path/to为项目的上一级目录,这样配置后支持多项目
#--protocal=fcgi为使用fast-cgi模式
#--env-parent-dir为项目的父目录。例如项目project1位置为/path/to/project1
#--auth为用户登录配置
#-d表示用守护进程启动
tracd --protocol=fcgi --env-parent-dir=/path/to/ -d --auth=*,/path/to/passwd,trac

 

 

 

 

文章来源:

Author:recoye
link:http://www.recoye.com/nginx-trac-fast-cgi