Advertisement
Guest User

Untitled

a guest
May 30th, 2015
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.67 KB | None | 0 0
  1. # Configuration file for varnish
  2. #
  3. # /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from this
  4. # shell script fragment.
  5. #
  6.  
  7. # Maximum number of open files (for ulimit -n)
  8. NFILES=131072
  9.  
  10. # Locked shared memory (for ulimit -l)
  11. # Default log size is 82MB + header
  12. MEMLOCK=82000
  13.  
  14. # Maximum number of threads (for ulimit -u)
  15. NPROCS="unlimited"
  16.  
  17. # Maximum size of corefile (for ulimit -c). Default in Fedora is 0
  18. # DAEMON_COREFILE_LIMIT="unlimited"
  19.  
  20. # Set this to 1 to make init script reload try to switch vcl without restart.
  21. # To make this work, you need to set the following variables
  22. # explicit: VARNISH_VCL_CONF, VARNISH_ADMIN_LISTEN_ADDRESS,
  23. # VARNISH_ADMIN_LISTEN_PORT, VARNISH_SECRET_FILE, or in short,
  24. # use Alternative 3, Advanced configuration, below
  25. RELOAD_VCL=1
  26.  
  27. # This file contains 4 alternatives, please use only one.
  28.  
  29. ## Alternative 1, Minimal configuration, no VCL
  30. #
  31. # Listen on port 6081, administration on localhost:6082, and forward to
  32. # content server on localhost:8080. Use a fixed-size cache file.
  33. #
  34. #DAEMON_OPTS="-a :6081 \
  35. # -T localhost:6082 \
  36. # -b localhost:8080 \
  37. # -u varnish -g varnish \
  38. # -s file,/var/lib/varnish/varnish_storage.bin,1G"
  39.  
  40.  
  41. ## Alternative 2, Configuration with VCL
  42. #
  43. # Listen on port 6081, administration on localhost:6082, and forward to
  44. # one content server selected by the vcl file, based on the request. Use a
  45. # fixed-size cache file.
  46. #
  47. #DAEMON_OPTS="-a :6081 \
  48. # -T localhost:6082 \
  49. # -f /etc/varnish/default.vcl \
  50. # -u varnish -g varnish \
  51. # -S /etc/varnish/secret \
  52. # -s file,/var/lib/varnish/varnish_storage.bin,1G"
  53.  
  54.  
  55. ## Alternative 3, Advanced configuration
  56. #
  57. # See varnishd(1) for more information.
  58. #
  59. # # Main configuration file. You probably want to change it :)
  60. VARNISH_VCL_CONF=/etc/varnish/default.vcl
  61. #
  62. # # Default address and port to bind to
  63. # # Blank address means all IPv4 and IPv6 interfaces, otherwise specify
  64. # # a host name, an IPv4 dotted quad, or an IPv6 address in brackets.
  65. # VARNISH_LISTEN_ADDRESS=
  66. VARNISH_LISTEN_PORT=80
  67. #
  68. # # Telnet admin interface listen address and port
  69. VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1
  70. VARNISH_ADMIN_LISTEN_PORT=6082
  71. #
  72. # # Shared secret file for admin interface
  73. VARNISH_SECRET_FILE=/etc/varnish/secret
  74. #
  75. # # The minimum number of worker threads to start
  76. VARNISH_MIN_THREADS=50
  77. #
  78. # # The Maximum number of worker threads to start
  79. VARNISH_MAX_THREADS=1000
  80. #
  81. # # Idle timeout for worker threads
  82. VARNISH_THREAD_TIMEOUT=120
  83. #
  84. # # Cache file location
  85. VARNISH_STORAGE_FILE=/var/lib/varnish/varnish_storage.bin
  86. #
  87. # # Cache file size: in bytes, optionally using k / M / G / T suffix,
  88. # # or in percentage of available disk space using the % suffix.
  89. VARNISH_STORAGE_SIZE=1G
  90. #
  91. # # Backend storage specification
  92. VARNISH_STORAGE="file,${VARNISH_STORAGE_FILE},${VARNISH_STORAGE_SIZE}"
  93. #
  94. # # Default TTL used when the backend does not specify one
  95. VARNISH_TTL=120
  96. #
  97. # # DAEMON_OPTS is used by the init script. If you add or remove options, make
  98. # # sure you update this section, too.
  99. DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
  100. -f ${VARNISH_VCL_CONF} \
  101. -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
  102. -t ${VARNISH_TTL} \
  103. -w ${VARNISH_MIN_THREADS},${VARNISH_MAX_THREADS},${VARNISH_THREAD_TIMEOUT} \
  104. -u varnish -g varnish \
  105. -S ${VARNISH_SECRET_FILE} \
  106. -s ${VARNISH_STORAGE}"
  107.  
  108. ## Alternative 4, Do It Yourself. See varnishd(1) for more information.
  109. #
  110. DAEMON_OPTS="-a :80 \
  111. -T localhost:6082 \
  112. -f /etc/varnish/default.vcl \
  113. -S /etc/varnish/secret \
  114. -s malloc,256m"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement