Thanks for your response! I put this code in vcl file and even tried to use it as else but it didn't solve the probelm,
sub vcl_recv { set req.http.X-Orig-Forwarded-For = client.ip; if (req.url ~ "\.(jpe?g|png|gif|ico|js|css|zip|CSS|mp3|wma|wmv|avi)(\?.*|)$") { unset req.http.cookie; } #### backend definition for this request#### set req.backend = default; }and sub vcl_recv { set req.http.X-Orig-Forwarded-For = client.ip; if (req.url ~ "\.(jpe?g|png|gif|ico|js|css|zip|CSS|mp3|wma|wmv|avi)(\?.*|)$") { unset req.http.cookie; } else{ #### backend definition for this request#### set req.backend = default; } }There is nothing in nginx error file, and before I put nginx behinde the varnish it worked perfectly. the request for mysite.com/blog is send to nginx and nginx send it to port 81 and i've blocked this port in fireall. nginx port config is 127.0.0.1:81; is there anything more we need to change in nginx? I have been trying to write a "URLfix" for the vcl_rcv to make varnish understand thattt mysite.com/* = mysite.com/*/ = mysite.com/*/index.php * = a name without any extension, altså it's not a file but the name of directory. Thanks, --- Den tis 2011-07-12 skrev juan.sali...@mercurio.cl <juan.sali...@mercurio.cl>: It could have been you didn’t define the backend for the request in sub vcl_recv:sub vcl_recv { set req.http.X-Orig-Forwarded-For = client.ip; if (req.url ~ "\.(jpe?g|png|gif|ico|js|css|zip|CSS|mp3|wma|wmv|avi)(\?.*|)$") { unset req.http.cookie; } #### backend definition for this request#### set req.backend = default; } Juan Salinas Contreras De: varnish-misc-boun...@varnish-cache.org [mailto:varnish-misc-boun...@varnish-cache.org] En nombre de Your Friend Enviado el: domingo, 10 de julio de 2011 9:38 Para: Shibashish CC: varnish-misc@varnish-cache.org Asunto: Re: Problem with Varnish. hey, here is my vcl file: I commented out "sub vcl_fetch" because I got error while starting varnish. backend default { .host = "127.0.0.1"; .port = "81"; } sub vcl_recv { # add a unique header containing the client IP address set req.http.X-Orig-Forwarded-For = client.ip; # we're only handling static content for now so remove any # Cookie that was sent in the request as that makes caching # impossible. if (req.url ~ "\.(jpe?g|png|gif|ico|js|css|zip|CSS|mp3|wma|wmv|avi)(\?.*|)$") { unset req.http.cookie; } } #sub vcl_fetch { # if the backend server adds a cookie to all responses, # remove it from static content so that it can be cached. # if (req.url ~ "\.(jpe?g|png|gif|ico|js|css|zip|CSS|mp3|wma|wmv|avi)(\?.*|)$") { # unset obj.http.set-cookie; # } #} --- Den sön 2011-07-10 skrev Shibashish <shi...@gmail.com>: Hey guys, I am fairly new to the Varnish, I installed Varnish as the frontend to nginx, everything works fine föruton a strange problem that I have never encountered before when I used only the nginx; I have an index page that links to the archives of this dress in two different ways: Link 1: website.com/blog/archive/index.php Link 2: website.com/blog/archive/ Here comes the problem, with Varnish does not link two work, the browser simply can not access the page and after a few seconds, nothing appears in the browser and the address bar shows the address that a page can not be reached, the address that appears in the address bar is: website.com:beckendport/blog/archive/ Configuration of the Web server is 127.0.0.1:beckendport and Varnish 80. I don't use htaccess. I would be grateful if you help me with this problem.Thanks! _______________________________________________ varnish-misc mailing list varnish-misc@varnish-cache.org https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc Please post your vcl file. ShiB. while ( ! ( succeed = try() ) );
_______________________________________________ varnish-misc mailing list varnish-misc@varnish-cache.org https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc