Edgewall Software

Changes between Version 6 and Version 7 of TracNginxRecipe


Ignore:
Timestamp:
Jan 17, 2007, 5:02:28 AM (17 years ago)
Author:
joshland@…
Comment:

Updates for serving static content

Legend:

Unmodified
Added
Removed
Modified
  • TracNginxRecipe

    v6 v7  
    106106}}}
    107107
     108'''Static Content'''[[br]]
     109Serving static files from htdocs dir ala /<site>/chrome/common aliases `http://live.trachosts.com/myproj/chrome/common` to `/var/trachosts/trac/myproj/htdocs`
     110{{{
     111        location ~ /(.*?)/chrome/common/ {
     112                rewrite /(.*?)/chrome/common/(.*) /$1/htdocs/$2 break;
     113                root    /var/trachosts/trac;
     114        }
     115
     116}}}
     117
    108118
    109119== Subversion ==
     
    114124<VirtualHost *:80>
    115125    ServerAdmin webmaster@trachosts.com
    116     ServerName trachosts.com
     126
     127    # in order to support COPY and MOVE, etc -  over https (443),
     128    # ServerName _must_ be the same as the nginx servername
     129    ServerName live.trachosts.com
     130    UseCanonicalName on
     131
    117132    DocumentRoot "/var/www/live.trachosts.com/htdocs"
    118133
     
    146161        proxy_pass      http://127.0.0.1:80;
    147162        include         /etc/nginx/proxy.conf;
     163        set  $dest  $http_destination;
     164        if ($http_destination ~ "^https://(.+)") {
     165           set  $dest   http://$1;
     166        }
     167        proxy_set_header  Destination   $dest;
    148168}
    149169}}}