Advertisement
Guest User

fuf-local.vcl

a guest
Jul 25th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. // Define backends
  2. backend backend01 {
  3. .host = "127.0.0.1";
  4. .port = "8080";
  5. .probe = {
  6. .request =
  7. "HEAD /ping HTTP/1.1"
  8. "Host: www.oursite.com"
  9. "Connection: close";
  10. .timeout = 2s;
  11. .interval = 1s;
  12. .window = 1;
  13. .threshold = 1;
  14. }
  15. }
  16.  
  17. // Director setup
  18. sub vcl_init {
  19. new score = directors.round_robin();
  20. score.add_backend(backend01);
  21. }
  22.  
  23. // Access control (mainly for PURGE commands)
  24. acl purge {
  25. "localhost";
  26. "127.0.0.1";
  27. "::1";
  28. }
  29.  
  30. acl intern {
  31. "x.x.x.x";
  32. }
  33.  
  34. // Bad IP adresses we want to keep out - see hash.vcl
  35. acl badguys {
  36. "11.22.33.44";
  37. }
  38.  
  39. // Sub-routine for setting the backend director and the X-Forwarded-For HTTP
  40. // header. Called by vcl_recv.
  41. sub set_director_and_forwardedfor {
  42. set req.backend_hint = score.backend();
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement