Ir para conteúdo
View in the app

A better way to browse. Learn more.

Portal do Host

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies


Postado

UPPPPPPPPPPPPPPPPPPPPP


Postado
  • Autor

Mude isto:

backend default {
.host = "IP_DO_SEU_SERVIDOR_AQUI_ENTRE_ASPAS";
.port = "8081";
}

E depois acrescente isto depois de sub vcl_recv{:

set req.backend = default;

Se os procedimentos descritos aqui não funcionarem, recomendo contratar alguém para ajuda-lo pois poderá ser que há outros problemas no seu servidor.


Postado

pow nao funciou, to ferrado,

blz vlw


Postado

amigo, instalei varnish em outro vps aqui, e funcionou,

 

desta vez instalei o debian

 

consegui arrumar as portas etc....

 

so que, sempre que adiciono a linha sub vcl_fetch { da este erro

 

 

 

 
root@WS-908RL ~# service varnish restart
[FAIL] Stopping HTTP accelerator: varnishd failed!
[FAIL] Starting HTTP accelerator: varnishd failed!
Message from VCC-compiler:
Invalid return "pass"
('input' Line 59 Pos 21)
            return (pass);
--------------------####--
 
 
...in subroutine "vcl_fetch"
('input' Line 54 Pos 5)
sub vcl_fetch {
----#########--
 
...which is the "vcl_fetch" method
Legal returns are: "deliver" "error" "hit_for_pass" "restart"
Running VCC-compiler failed, exit 1
 
VCL compilation failed
 
sub vcl_fetch {
    /* Host: www.mysite.com */
    if (req.http.host ~ "^(?:www\.)?mysite.com") {
        /* Do not cache POST requests */
        if (req.request == "POST") {
>>>>>>>LINHA 59 <<<<<<< return (pass);
        }
        /* If the request is for pictures, javascript, css, etc */
        if (req.url ~ "\.(jpg|jpeg|png|gif|css|js)$") {
            /* Cache it, and make it last 2 hours */
            set beresp.ttl = 7200s;
            /* Make the request static by removing any cookies set by those static files */
            unset beresp.http.set-cookie;
            /* Deliver the cached object */
            return (deliver);
        }
        /* If I am logged in to wordpress, I DO NOT WANT TO SEE cached pages */
        if (req.http.cookie ~ "wordpress_logged_in") {
            return (pass);
        } else {
            /* Cache anything for 2 minutes. When the cache expires it will be cached again and again, at the time of the request */
            set beresp.ttl = 120s;
            return (deliver);
        }
    }
}
 
 
 varnishd -V
varnishd (varnish-3.0.5 revision 1a89b1f)
Copyright © 2006 Verdens Gang AS
Copyright © 2006-2011 Varnish Software AS
 

Postado
  • Autor

Procure na net outra vcl para WP e vá testando, ou construa a sua própria. Mas é na vcl_fetch que é feito quase 90% do milagre.


Postado

pois é, procurei, achei varias, a vcl fecht NUNCA funciona....


Visitante
Este tópico está impedido de receber novos posts.

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Informação Importante

Concorda com os nossos termos?

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.