<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<br>
<div class="gmail_quote">hi all:<br>
  <br>
     i install varnish using the source code "varnish-2.1.4.tar.gz" in ubuntu10.4  <br>
     and "Red Hat Enterprise Linux Server release 5.3 (Tikanga)"<br>
    <br>
    when i use ESI in ubuntu, it's ok, both the main page and the esi included page can be showed<br>
   <br>
    but the same configure file and the same pages in redhat, only the main page can be showed<br>
<br>
    the configure file is as below:<br>
  <br>
   <span style="background-color: rgb(51, 255, 51);"> backend default {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     .host = "127.0.0.1";</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     .port = "80";</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">    }</span><br style="background-color: rgb(51, 255, 51);">
<br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">   backend javaeye {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">    .host = "<a href="http://www.javaeye.com">www.javaeye.com</a>";</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">    .port = "80";</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">    .connect_timeout = 1s;</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">    .first_byte_timeout = 5s;</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">    .between_bytes_timeout = 2s;</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">   }</span><br style="background-color: rgb(51, 255, 51);">
<br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">   acl purge {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       "localhost";</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       "127.0.0.1";</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       "192.168.1.0"/24;</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">    }</span><br style="background-color: rgb(51, 255, 51);">
<br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">    sub vcl_recv {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">      if (req.request == "PURGE") {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">               if (!client.ip ~ purge) {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">                       error 405 "Not allowed.";</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">               }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">               return(lookup);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       }</span><br style="background-color: rgb(51, 255, 51);">
<br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       if (req.url ~ "^/forums/") {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">        set req.backend = javaeye;</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">        set req.http.Host="<a href="http://www.javaeye.com">www.javaeye.com</a>";</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">        return (pass);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       } else {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">        set req.backend = default;</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">      </span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">    if (req.restarts == 0) {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     if (req.http.x-forwarded-for) {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">         set req.http.X-Forwarded-For =</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">         req.http.X-Forwarded-For ", " client.ip;</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     } else {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">         set req.http.X-Forwarded-For = client.ip;</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     if (req.request != "GET" &&</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       req.request != "HEAD" &&</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       req.request != "PUT" &&</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       req.request != "POST" &&</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       req.request != "TRACE" &&</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       req.request != "OPTIONS" &&</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       req.request != "DELETE") {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       return (pipe);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     if (req.request != "GET" && req.request != "HEAD") {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">         /* We only deal with GET and HEAD by default */</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">         return (pass);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     if (req.http.Authorization || req.http.Cookie) {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">         return (pass);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     return (lookup);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> }</span><br style="background-color: rgb(51, 255, 51);">
<br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> sub vcl_pass {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     return (pass);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> }</span><br style="background-color: rgb(51, 255, 51);">
<br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> sub vcl_hit {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">      if (req.request == "PURGE") {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">               set obj.ttl = 0s;</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">               error 200 "Purged.";</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">       }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     if (!obj.cacheable) {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">         return (pass);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     return (deliver);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> }</span><br style="background-color: rgb(51, 255, 51);">
<br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> sub vcl_miss {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">      if (req.request == "PURGE") {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">                error 404 "Not in cache.";</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">        }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     </span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     return (fetch);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> }</span><br style="background-color: rgb(51, 255, 51);">
<br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> sub vcl_fetch {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     if (req.url ~ "/[a-z0-9]+.html$") {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">        esi;  /* Do ESI processing */</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     remove beresp.http.Last-Modified;</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     remove beresp.http.Etag;</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     #set beresp.http.Cache-Control="no-cache";
</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     </span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     if (!beresp.cacheable) {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">         return (pass);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     if (beresp.http.Set-Cookie) {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">         return (pass);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     if (req.url ~ "^/[a-z]+/") {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">         /* We only deal with GET and HEAD by default */</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">         return (pass);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     }</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     return (deliver);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> }</span><br style="background-color: rgb(51, 255, 51);">
<br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> sub vcl_deliver {</span><br style="background-color: rgb(51, 255, 51);">
<br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     return (deliver);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> }</span><br style="background-color: rgb(51, 255, 51);">
<br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> sub vcl_error {</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     set obj.http.Content-Type = "text/html; charset=utf-8";</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     synthetic {"</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> <?xml version="1.0" encoding="utf-8"?></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">  "<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>"></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> <html></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">   <head></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     <title>"} obj.status " " obj.response {"</title></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">   </head></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">   <body></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     <h1>Error "} obj.status " " obj.response {"</h1></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     <p>"} obj.response {"</p></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     <h3>Guru Meditation:</h3></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     <p>XID: "} req.xid {"</p></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     <hr></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     <p>Varnish cache server</p></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">   </body></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> </html></span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> "};</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);">     return (deliver);</span><br style="background-color: rgb(51, 255, 51);">
<span style="background-color: rgb(51, 255, 51);"> }</span><br>
   <br>
    the main page url:  <a href="http://10.20.156.7:8000/haha.html">http://10.20.156.7:8000/haha.html</a><br>
    the main page content: <br>
   <br>
    <span style="background-color: rgb(51, 102, 255);"><html></span><br style="background-color: rgb(51, 102, 255);">
<span style="background-color: rgb(51, 102, 255);">      <body></span><br style="background-color: rgb(51, 102, 255);">
<span style="background-color: rgb(51, 102, 255);">       123haha111</span><br style="background-color: rgb(51, 102, 255);">
<span style="background-color: rgb(51, 102, 255);">       <esi:include src="/forums/board/java" /></span><br style="background-color: rgb(51, 102, 255);">
<span style="background-color: rgb(51, 102, 255);">     </body></span><br style="background-color: rgb(51, 102, 255);">
<span style="background-color: rgb(51, 102, 255);">    </html></span><br>
<br>
<br>
     please help me! thanks !<br>
<br>
    <br>
<pre>  Regards! <br>  pwlazy<br></pre>
     <br>
     <br>
    <br>
  <br>
</div>
<br>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
This email (including any attachments) is confidential and may be legally privileged. If you received this email in error, please delete it immediately and do not copy it or use it for any purpose or disclose its contents to any other person. Thank you.<br>
<br>
本电邮(包括任何附件)可能含有机密资料并受法律保护。如您不是正确的收件人,请您立即删除本邮件。请不要将本电邮进行复制并用作任何其他用途、或透露本邮件之内容。谢谢。<br>
</font>
</body>
</html>