Changes between Version 22 and Version 23 of TracNginxRecipe
- Timestamp:
- Nov 25, 2012, 2:26:19 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracNginxRecipe
v22 v23 43 43 /etc/nginx/nginx.conf 44 44 {{{ 45 #!nginx 45 46 http { 46 47 include /etc/nginx/mime.types; … … 77 78 /etc/nginx/nginx.conf 78 79 {{{ 80 #!nginx 79 81 http { 80 82 include /etc/nginx/mime.types; … … 129 131 Serving static files from htdocs dir ala /<site>/chrome/site aliases `http://live.trachosts.com/myproj/chrome/site` to `/var/trachosts/trac/myproj/htdocs` 130 132 {{{ 133 #!nginx 131 134 location ~ /(.*?)/chrome/site/ { 132 135 rewrite /(.*?)/chrome/site/(.*) /$1/htdocs/$2 break; … … 148 151 149 152 {{{ 153 #!apache 150 154 Listen 127.0.0.1:80 151 155 <VirtualHost *:80> … … 185 189 Add this to the server section of the Nginx config. (in the :80 line, or the :443, whatever) 186 190 {{{ 191 #!nginx 187 192 location /svn { 188 193 proxy_pass http://127.0.0.1:80; … … 264 269 `/usr/local/etc/rc.d/trac` 265 270 {{{ 271 #!sh 266 272 #!/bin/sh 267 273 # … … 423 429 This is the Nginx configuration snippet: 424 430 {{{ 431 #!nginx 425 432 server { 426 433 location / { … … 435 442 And then, you can start tracd with the following command if you use multi-project setup (notice the *): 436 443 {{{ 444 #!sh 437 445 tracd --port=8000 --hostname=127.0.0.1 --env-parent-dir=/home/trac --basic-auth="*,/etc/nginx/htpasswd,Restricted" 438 446 }}} 439 447 Or the following command if you run one tracd per project: 440 448 {{{ 449 #!sh 441 450 tracd --port=8000 --single-env /path/to/trac/environments/project --basic-auth="project,/etc/nginx/htpasswd,Restricted" 442 451 }}} … … 451 460 ---- 452 461 See also TracFastCgi#SimpleNginxConfiguration1 462 {{{ 463 #!sh 453 464 if [ $? -eq 0 ] 454 465 then … … 472 483 i=$(( $i + 1 )) 473 484 [ -z "$(eval echo "\${DIR_PROJECT_${i}}")" ] 485 }}}