Changeset 51:de2fd68c1aca in minitage/eggs/minitage.paste

Show
Ignore:
Timestamp:
08/12/08 18:48:54 (5 months ago)
Author:
kiorky <kiorky@…>
Message:

0.0.1_alpha34


  • fix init script

0.0.1_alpha33
---------------

  • rename varnish binaries
Files:
4 modified
9 moved

Legend:

Unmodified
Added
Removed
  • CHANGES.txt

    r50 r51  
    22CHANGES 
    33============== 
     40.0.1_alpha34 
     5---------------  
     6 - fix init script 
    47 
    5 0.0.1_alpha29 
     80.0.1_alpha33 
    69---------------  
     10 - rename varnish binaries 
     11 
     120.0.1_alpha32 
     13--------------- 
     14    - Improve varnish default vcl 
     15 
     160.0.1_alpha31 
     17--------------- 
     18 - Improve varnish default vcl 
     19 
     200.0.1_alpha30 
     21--------------- 
    722 - Improve varnish template 
    8  
    923 
    10240.0.1_alpha29 
  • minitage/paste/profils/varnish/template/bin/varnish-instance_tmpl

    r46 r51  
    22source $sys/share/minitage/minitage.env 
    33export  LD_LIBRARY_PATH=$vp/lib/ 
    4 exec $sys/bin/${project}_varnishd \ 
     4exec $sys/bin/varnishd \ 
    55    -f "$sys/etc/varnish/${project}.vcl" \ 
    66    -P "$sys/var/run/varnish/${project}.pid" \ 
  • minitage/paste/profils/varnish/template/etc/init.d/+project+_varnish_tmpl

    r46 r51  
    3030    fi 
    3131    if [[ `whoami` == root ]];then 
    32         su \$effectiveuser -c "${sys}/bin/${project}_varnish-instance" 
     32        su \$effectiveuser -c "${sys}/bin/varnish-instance" 
    3333    else 
    34         ${sys}/bin/${project}_varnish-instance 
     34        ${sys}/bin/varnish-instance 
    3535    fi 
    3636    eend \$? 
  • minitage/paste/profils/varnish/template/etc/varnish/+project+.vcl_tmpl

    r50 r51  
    1616 
    1717sub vcl_recv { 
    18  
    1918    /* Purge stuff */ 
    2019    if (req.request == "PURGE") { 
     
    2322        } 
    2423        lookup; 
    25     }  
     24    } 
    2625 
    2726    /* 
     
    3433    #set $host, $port = $host_address.split(':') 
    3534    elsif (req.url ~ "^/VirtualHostBase/http/${vhost_vhm}${zope_path}/VirtualHostRoot") { 
     35        /* uncomment this code to unify vhosts if you need to do */ 
     36        // /* first: unify the host header */ 
     37        // if (req.http.host ~ "^.*example.com") { 
     38        //     set req.http.host = "example.com"; 
     39        // } 
     40 
     41        // /* zope specific: unify vhost_vhm url */ 
     42        // set req.url = regsub(req.url, "^/VirtualHostBase/http/${vhost_vhm}", "/VirtualHostBase/http/example.com:80"); 
     43 
    3644        set req.backend = backend_0; 
    3745    } 
     
    8088 
    8189    /* handle http compression. */ 
    82     /* 
    8390    if (req.http.Accept-Encoding) { 
    8491        // Handle compression correctly. Varnish treats headers literally, not 
     
    96103            remove req.http.Accept-Encoding; 
    97104        } 
    98     }*/ 
     105    } 
    99106 
    100107    if (req.http.Expect) { 
     
    136143 
    137144sub vcl_hash { 
    138     /* 
    139      * The hash subroutine is important 
    140      * It defines the "name" pattern of 
    141      * cache objects 
    142      * We will use url+host by default. 
    143      * In this way, different machines may 
    144      * share the same cache object. 
    145      */ 
    146145    set req.hash += req.url; 
    147     set req.hash += req.http.host; 
    148  
    149     /* 
    150      * You can also append cookie 
    151      * to the hash. In this way, 
    152      * varnish will fetch/insert a cache object for each 
    153      * machine. 
    154      */ 
    155     if (!(req.url ~ "\.(css|js|png|gif|jpg|jpeg|tiff|doc|odt|pdf|htc)$")) { 
    156         if (req.http.Cookie && req.http.Cookie ~ "_ZopeId" ) { 
    157             set req.hash += req.http.Cookie; 
    158         } 
     146    if (req.http.host) { 
     147        set req.hash += req.http.host; 
     148    } else { 
     149 
     150        set req.hash += server.ip; 
    159151    } 
    160152    hash; 
     
    162154 
    163155sub vcl_fetch { 
     156 
     157 
    164158    /*  Do not store errors in cache, as maybe they will be corrected soon :-) */ 
    165159    if (obj.status == 404 || obj.status == 500) { 
     
    233227    insert; 
    234228} 
     229\# vim: set ft=c: 
    235230#end if 
  • setup.py

    r49 r51  
    77 
    88name='minitage.paste' 
    9 version = '0.0.1_alpha29' 
     9version = '0.0.1_alpha34' 
    1010 
    1111def read(rnames):